@yext/visual-editor 0.0.14 → 0.0.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{debugger-DIg74Hi7-CWHlc9g3.cjs → debugger-C-GK2f4q-7P5nIXek.cjs} +1 -1
- package/dist/{debugger-DIg74Hi7-BOv1lzLW.js → debugger-C-GK2f4q-CM9lUegF.js} +1 -1
- package/dist/index-B5wBZ4uV.cjs +280 -0
- package/dist/{index-DLxgTpUm.js → index-CR1QI1Dd.js} +14492 -14377
- package/dist/index.d.cts +56 -31
- package/dist/index.d.ts +56 -31
- package/dist/style.css +1 -1
- package/dist/visual-editor.cjs +1 -1
- package/dist/visual-editor.js +22 -20
- package/package.json +2 -2
- package/dist/index-DBzsBFTa.cjs +0 -280
package/dist/index-DBzsBFTa.cjs
DELETED
|
@@ -1,280 +0,0 @@
|
|
|
1
|
-
"use strict";var b1=Object.defineProperty;var _1=(e,t,n)=>t in e?b1(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var fl=(e,t,n)=>_1(e,typeof t!="symbol"?t+"":t,n);const z=require("react"),Ru=require("react-dom"),Zt=require("@measured/puck"),x1=require("uuid");function Fx(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const de=Fx(z),Ng=Fx(Ru);var Nd=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function E1(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Mp={exports:{}},Xc={};/**
|
|
2
|
-
* @license React
|
|
3
|
-
* react-jsx-runtime.production.min.js
|
|
4
|
-
*
|
|
5
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
6
|
-
*
|
|
7
|
-
* This source code is licensed under the MIT license found in the
|
|
8
|
-
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var Pv;function C1(){if(Pv)return Xc;Pv=1;var e=z,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function a(l,u,p){var m,_={},v=null,C=null;p!==void 0&&(v=""+p),u.key!==void 0&&(v=""+u.key),u.ref!==void 0&&(C=u.ref);for(m in u)r.call(u,m)&&!i.hasOwnProperty(m)&&(_[m]=u[m]);if(l&&l.defaultProps)for(m in u=l.defaultProps,u)_[m]===void 0&&(_[m]=u[m]);return{$$typeof:t,type:l,key:v,ref:C,props:_,_owner:o.current}}return Xc.Fragment=n,Xc.jsx=a,Xc.jsxs=a,Xc}var Qc={};/**
|
|
10
|
-
* @license React
|
|
11
|
-
* react-jsx-runtime.development.js
|
|
12
|
-
*
|
|
13
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
14
|
-
*
|
|
15
|
-
* This source code is licensed under the MIT license found in the
|
|
16
|
-
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var Iv;function w1(){return Iv||(Iv=1,process.env.NODE_ENV!=="production"&&function(){var e=z,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),l=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),m=Symbol.for("react.suspense_list"),_=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),C=Symbol.for("react.offscreen"),b=Symbol.iterator,y="@@iterator";function N(ae){if(ae===null||typeof ae!="object")return null;var $e=b&&ae[b]||ae[y];return typeof $e=="function"?$e:null}var R=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function O(ae){{for(var $e=arguments.length,Be=new Array($e>1?$e-1:0),at=1;at<$e;at++)Be[at-1]=arguments[at];k("error",ae,Be)}}function k(ae,$e,Be){{var at=R.ReactDebugCurrentFrame,xt=at.getStackAddendum();xt!==""&&($e+="%s",Be=Be.concat([xt]));var _t=Be.map(function(gt){return String(gt)});_t.unshift("Warning: "+$e),Function.prototype.apply.call(console[ae],console,_t)}}var I=!1,M=!1,Y=!1,ee=!1,re=!1,Z;Z=Symbol.for("react.module.reference");function U(ae){return!!(typeof ae=="string"||typeof ae=="function"||ae===r||ae===i||re||ae===o||ae===p||ae===m||ee||ae===C||I||M||Y||typeof ae=="object"&&ae!==null&&(ae.$$typeof===v||ae.$$typeof===_||ae.$$typeof===a||ae.$$typeof===l||ae.$$typeof===u||ae.$$typeof===Z||ae.getModuleId!==void 0))}function J(ae,$e,Be){var at=ae.displayName;if(at)return at;var xt=$e.displayName||$e.name||"";return xt!==""?Be+"("+xt+")":Be}function fe(ae){return ae.displayName||"Context"}function ge(ae){if(ae==null)return null;if(typeof ae.tag=="number"&&O("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof ae=="function")return ae.displayName||ae.name||null;if(typeof ae=="string")return ae;switch(ae){case r:return"Fragment";case n:return"Portal";case i:return"Profiler";case o:return"StrictMode";case p:return"Suspense";case m:return"SuspenseList"}if(typeof ae=="object")switch(ae.$$typeof){case l:var $e=ae;return fe($e)+".Consumer";case a:var Be=ae;return fe(Be._context)+".Provider";case u:return J(ae,ae.render,"ForwardRef");case _:var at=ae.displayName||null;return at!==null?at:ge(ae.type)||"Memo";case v:{var xt=ae,_t=xt._payload,gt=xt._init;try{return ge(gt(_t))}catch{return null}}}return null}var te=Object.assign,he=0,V,B,q,ie,H,j,Q;function F(){}F.__reactDisabledLog=!0;function w(){{if(he===0){V=console.log,B=console.info,q=console.warn,ie=console.error,H=console.group,j=console.groupCollapsed,Q=console.groupEnd;var ae={configurable:!0,enumerable:!0,value:F,writable:!0};Object.defineProperties(console,{info:ae,log:ae,warn:ae,error:ae,group:ae,groupCollapsed:ae,groupEnd:ae})}he++}}function T(){{if(he--,he===0){var ae={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:te({},ae,{value:V}),info:te({},ae,{value:B}),warn:te({},ae,{value:q}),error:te({},ae,{value:ie}),group:te({},ae,{value:H}),groupCollapsed:te({},ae,{value:j}),groupEnd:te({},ae,{value:Q})})}he<0&&O("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var P=R.ReactCurrentDispatcher,X;function ue(ae,$e,Be){{if(X===void 0)try{throw Error()}catch(xt){var at=xt.stack.trim().match(/\n( *(at )?)/);X=at&&at[1]||""}return`
|
|
18
|
-
`+X+ae}}var pe=!1,se;{var Ce=typeof WeakMap=="function"?WeakMap:Map;se=new Ce}function Se(ae,$e){if(!ae||pe)return"";{var Be=se.get(ae);if(Be!==void 0)return Be}var at;pe=!0;var xt=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var _t;_t=P.current,P.current=null,w();try{if($e){var gt=function(){throw Error()};if(Object.defineProperty(gt.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(gt,[])}catch(Jn){at=Jn}Reflect.construct(ae,[],gt)}else{try{gt.call()}catch(Jn){at=Jn}ae.call(gt.prototype)}}else{try{throw Error()}catch(Jn){at=Jn}ae()}}catch(Jn){if(Jn&&at&&typeof Jn.stack=="string"){for(var Ot=Jn.stack.split(`
|
|
19
|
-
`),Wt=at.stack.split(`
|
|
20
|
-
`),Dt=Ot.length-1,Gt=Wt.length-1;Dt>=1&&Gt>=0&&Ot[Dt]!==Wt[Gt];)Gt--;for(;Dt>=1&&Gt>=0;Dt--,Gt--)if(Ot[Dt]!==Wt[Gt]){if(Dt!==1||Gt!==1)do if(Dt--,Gt--,Gt<0||Ot[Dt]!==Wt[Gt]){var mn=`
|
|
21
|
-
`+Ot[Dt].replace(" at new "," at ");return ae.displayName&&mn.includes("<anonymous>")&&(mn=mn.replace("<anonymous>",ae.displayName)),typeof ae=="function"&&se.set(ae,mn),mn}while(Dt>=1&&Gt>=0);break}}}finally{pe=!1,P.current=_t,T(),Error.prepareStackTrace=xt}var xr=ae?ae.displayName||ae.name:"",wn=xr?ue(xr):"";return typeof ae=="function"&&se.set(ae,wn),wn}function He(ae,$e,Be){return Se(ae,!1)}function le(ae){var $e=ae.prototype;return!!($e&&$e.isReactComponent)}function ce(ae,$e,Be){if(ae==null)return"";if(typeof ae=="function")return Se(ae,le(ae));if(typeof ae=="string")return ue(ae);switch(ae){case p:return ue("Suspense");case m:return ue("SuspenseList")}if(typeof ae=="object")switch(ae.$$typeof){case u:return He(ae.render);case _:return ce(ae.type,$e,Be);case v:{var at=ae,xt=at._payload,_t=at._init;try{return ce(_t(xt),$e,Be)}catch{}}}return""}var ve=Object.prototype.hasOwnProperty,ke={},Pe=R.ReactDebugCurrentFrame;function Fe(ae){if(ae){var $e=ae._owner,Be=ce(ae.type,ae._source,$e?$e.type:null);Pe.setExtraStackFrame(Be)}else Pe.setExtraStackFrame(null)}function Qe(ae,$e,Be,at,xt){{var _t=Function.call.bind(ve);for(var gt in ae)if(_t(ae,gt)){var Ot=void 0;try{if(typeof ae[gt]!="function"){var Wt=Error((at||"React class")+": "+Be+" type `"+gt+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof ae[gt]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw Wt.name="Invariant Violation",Wt}Ot=ae[gt]($e,gt,at,Be,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Dt){Ot=Dt}Ot&&!(Ot instanceof Error)&&(Fe(xt),O("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",at||"React class",Be,gt,typeof Ot),Fe(null)),Ot instanceof Error&&!(Ot.message in ke)&&(ke[Ot.message]=!0,Fe(xt),O("Failed %s type: %s",Be,Ot.message),Fe(null))}}}var st=Array.isArray;function dt(ae){return st(ae)}function At(ae){{var $e=typeof Symbol=="function"&&Symbol.toStringTag,Be=$e&&ae[Symbol.toStringTag]||ae.constructor.name||"Object";return Be}}function Ae(ae){try{return me(ae),!1}catch{return!0}}function me(ae){return""+ae}function _e(ae){if(Ae(ae))return O("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",At(ae)),me(ae)}var De=R.ReactCurrentOwner,je={key:!0,ref:!0,__self:!0,__source:!0},Me,We,tt;tt={};function ht(ae){if(ve.call(ae,"ref")){var $e=Object.getOwnPropertyDescriptor(ae,"ref").get;if($e&&$e.isReactWarning)return!1}return ae.ref!==void 0}function Et(ae){if(ve.call(ae,"key")){var $e=Object.getOwnPropertyDescriptor(ae,"key").get;if($e&&$e.isReactWarning)return!1}return ae.key!==void 0}function Lt(ae,$e){if(typeof ae.ref=="string"&&De.current&&$e&&De.current.stateNode!==$e){var Be=ge(De.current.type);tt[Be]||(O('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',ge(De.current.type),ae.ref),tt[Be]=!0)}}function Xe(ae,$e){{var Be=function(){Me||(Me=!0,O("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",$e))};Be.isReactWarning=!0,Object.defineProperty(ae,"key",{get:Be,configurable:!0})}}function qe(ae,$e){{var Be=function(){We||(We=!0,O("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",$e))};Be.isReactWarning=!0,Object.defineProperty(ae,"ref",{get:Be,configurable:!0})}}var lt=function(ae,$e,Be,at,xt,_t,gt){var Ot={$$typeof:t,type:ae,key:$e,ref:Be,props:gt,_owner:_t};return Ot._store={},Object.defineProperty(Ot._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(Ot,"_self",{configurable:!1,enumerable:!1,writable:!1,value:at}),Object.defineProperty(Ot,"_source",{configurable:!1,enumerable:!1,writable:!1,value:xt}),Object.freeze&&(Object.freeze(Ot.props),Object.freeze(Ot)),Ot};function et(ae,$e,Be,at,xt){{var _t,gt={},Ot=null,Wt=null;Be!==void 0&&(_e(Be),Ot=""+Be),Et($e)&&(_e($e.key),Ot=""+$e.key),ht($e)&&(Wt=$e.ref,Lt($e,xt));for(_t in $e)ve.call($e,_t)&&!je.hasOwnProperty(_t)&&(gt[_t]=$e[_t]);if(ae&&ae.defaultProps){var Dt=ae.defaultProps;for(_t in Dt)gt[_t]===void 0&&(gt[_t]=Dt[_t])}if(Ot||Wt){var Gt=typeof ae=="function"?ae.displayName||ae.name||"Unknown":ae;Ot&&Xe(gt,Gt),Wt&&qe(gt,Gt)}return lt(ae,Ot,Wt,xt,at,De.current,gt)}}var ot=R.ReactCurrentOwner,ct=R.ReactDebugCurrentFrame;function pt(ae){if(ae){var $e=ae._owner,Be=ce(ae.type,ae._source,$e?$e.type:null);ct.setExtraStackFrame(Be)}else ct.setExtraStackFrame(null)}var Ct;Ct=!1;function $t(ae){return typeof ae=="object"&&ae!==null&&ae.$$typeof===t}function Yt(){{if(ot.current){var ae=ge(ot.current.type);if(ae)return`
|
|
22
|
-
|
|
23
|
-
Check the render method of \``+ae+"`."}return""}}function Kt(ae){return""}var qt={};function fn(ae){{var $e=Yt();if(!$e){var Be=typeof ae=="string"?ae:ae.displayName||ae.name;Be&&($e=`
|
|
24
|
-
|
|
25
|
-
Check the top-level render call using <`+Be+">.")}return $e}}function dr(ae,$e){{if(!ae._store||ae._store.validated||ae.key!=null)return;ae._store.validated=!0;var Be=fn($e);if(qt[Be])return;qt[Be]=!0;var at="";ae&&ae._owner&&ae._owner!==ot.current&&(at=" It was passed a child from "+ge(ae._owner.type)+"."),pt(ae),O('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',Be,at),pt(null)}}function Cr(ae,$e){{if(typeof ae!="object")return;if(dt(ae))for(var Be=0;Be<ae.length;Be++){var at=ae[Be];$t(at)&&dr(at,$e)}else if($t(ae))ae._store&&(ae._store.validated=!0);else if(ae){var xt=N(ae);if(typeof xt=="function"&&xt!==ae.entries)for(var _t=xt.call(ae),gt;!(gt=_t.next()).done;)$t(gt.value)&&dr(gt.value,$e)}}}function Zo(ae){{var $e=ae.type;if($e==null||typeof $e=="string")return;var Be;if(typeof $e=="function")Be=$e.propTypes;else if(typeof $e=="object"&&($e.$$typeof===u||$e.$$typeof===_))Be=$e.propTypes;else return;if(Be){var at=ge($e);Qe(Be,ae.props,"prop",at,ae)}else if($e.PropTypes!==void 0&&!Ct){Ct=!0;var xt=ge($e);O("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",xt||"Unknown")}typeof $e.getDefaultProps=="function"&&!$e.getDefaultProps.isReactClassApproved&&O("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function oa(ae){{for(var $e=Object.keys(ae.props),Be=0;Be<$e.length;Be++){var at=$e[Be];if(at!=="children"&&at!=="key"){pt(ae),O("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",at),pt(null);break}}ae.ref!==null&&(pt(ae),O("Invalid attribute `ref` supplied to `React.Fragment`."),pt(null))}}var wr={};function Zn(ae,$e,Be,at,xt,_t){{var gt=U(ae);if(!gt){var Ot="";(ae===void 0||typeof ae=="object"&&ae!==null&&Object.keys(ae).length===0)&&(Ot+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var Wt=Kt();Wt?Ot+=Wt:Ot+=Yt();var Dt;ae===null?Dt="null":dt(ae)?Dt="array":ae!==void 0&&ae.$$typeof===t?(Dt="<"+(ge(ae.type)||"Unknown")+" />",Ot=" Did you accidentally export a JSX literal instead of a component?"):Dt=typeof ae,O("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Dt,Ot)}var Gt=et(ae,$e,Be,xt,_t);if(Gt==null)return Gt;if(gt){var mn=$e.children;if(mn!==void 0)if(at)if(dt(mn)){for(var xr=0;xr<mn.length;xr++)Cr(mn[xr],ae);Object.freeze&&Object.freeze(mn)}else O("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Cr(mn,ae)}if(ve.call($e,"key")){var wn=ge(ae),Jn=Object.keys($e).filter(function(Jo){return Jo!=="key"}),Mr=Jn.length>0?"{key: someKey, "+Jn.join(": ..., ")+": ...}":"{key: someKey}";if(!wr[wn+Mr]){var aa=Jn.length>0?"{"+Jn.join(": ..., ")+": ...}":"{}";O(`A props object containing a "key" prop is being spread into JSX:
|
|
26
|
-
let props = %s;
|
|
27
|
-
<%s {...props} />
|
|
28
|
-
React keys must be passed directly to JSX without using spread:
|
|
29
|
-
let props = %s;
|
|
30
|
-
<%s key={someKey} {...props} />`,Mr,wn,aa,wn),wr[wn+Mr]=!0}}return ae===r?oa(Gt):Zo(Gt),Gt}}function _r(ae,$e,Be){return Zn(ae,$e,Be,!0)}function lo(ae,$e,Be){return Zn(ae,$e,Be,!1)}var ia=lo,Ee=_r;Qc.Fragment=r,Qc.jsx=ia,Qc.jsxs=Ee}()),Qc}process.env.NODE_ENV==="production"?Mp.exports=C1():Mp.exports=w1();var ne=Mp.exports;function jx(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=jx(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function N1(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=jx(e))&&(r&&(r+=" "),r+=t);return r}const Lv=e=>typeof e=="boolean"?"".concat(e):e===0?"0":e,Fv=N1,Dr=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return Fv(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:i}=t,a=Object.keys(o).map(p=>{const m=n==null?void 0:n[p],_=i==null?void 0:i[p];if(m===null)return null;const v=Lv(m)||Lv(_);return o[p][v]}),l=n&&Object.entries(n).reduce((p,m)=>{let[_,v]=m;return v===void 0||(p[_]=v),p},{}),u=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((p,m)=>{let{class:_,className:v,...C}=m;return Object.entries(C).every(b=>{let[y,N]=b;return Array.isArray(N)?N.includes({...i,...l}[y]):{...i,...l}[y]===N})?[...p,_,v]:p},[]);return Fv(e,a,u,n==null?void 0:n.class,n==null?void 0:n.className)};function Bx(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=Bx(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function $u(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Bx(e))&&(r&&(r+=" "),r+=t);return r}const Hx=Dr("components text-body-fontSize",{variants:{fontWeight:{default:"font-body-fontWeight",thin:"font-thin",extralight:"font-extralight",light:"font-light",normal:"font-normal",medium:"font-medium",semibold:"font-semibold",bold:"font-bold",extrabold:"font-extrabold",black:"font-black"},color:{default:"text-body-color",primary:"text-palette-primary",secondary:"text-palette-secondary",accent:"text-palette-accent",text:"text-palette-text",background:"text-palette-background"},textTransform:{none:"",uppercase:"uppercase",lowercase:"lowercase",capitalize:"capitalize"}},defaultVariants:{fontWeight:"default",color:"default",textTransform:"none"}}),Tg=de.forwardRef(({className:e,fontWeight:t,color:n,textTransform:r,...o},i)=>ne.jsx("p",{className:$u(e,Hx({fontWeight:t,color:n,textTransform:r,className:e})),ref:i,...o,children:o.children}));Tg.displayName="Body";function T1(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function Wx(...e){return t=>e.forEach(n=>T1(n,t))}function er(...e){return de.useCallback(Wx(...e),e)}var Pa=de.forwardRef((e,t)=>{const{children:n,...r}=e,o=de.Children.toArray(n),i=o.find(S1);if(i){const a=i.props.children,l=o.map(u=>u===i?de.Children.count(a)>1?de.Children.only(null):de.isValidElement(a)?a.props.children:null:u);return ne.jsx(kp,{...r,ref:t,children:de.isValidElement(a)?de.cloneElement(a,void 0,l):null})}return ne.jsx(kp,{...r,ref:t,children:n})});Pa.displayName="Slot";var kp=de.forwardRef((e,t)=>{const{children:n,...r}=e;if(de.isValidElement(n)){const o=A1(n);return de.cloneElement(n,{...O1(r,n.props),ref:t?Wx(t,o):o})}return de.Children.count(n)>1?de.Children.only(null):null});kp.displayName="SlotClone";var Sg=({children:e})=>ne.jsx(ne.Fragment,{children:e});function S1(e){return de.isValidElement(e)&&e.type===Sg}function O1(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...l)=>{i(...l),o(...l)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function A1(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const zx=Dr("py-4 components inline-flex items-center justify-center whitespace-nowrap rounded-button-borderRadius text-button-fontSize font-button-fontWeight ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 ",{variants:{variant:{primary:"bg-palette-primary text-palette-secondary border-2 border-palette-primary hover:border-palette-secondary focus:border-palette-secondary active:bg-palette-secondary active:text-palette-primary active:border-palette-primary",secondary:"bg-palette-secondary text-palette-primary border-2 border-palette-secondary hover:border-palette-primary focus:border-palette-primary active:bg-palette-primary active:text-palette-secondary active:border-palette-secondary",outline:"border-palette-primary bg-palette-background border-2 hover:border-palette-background focus:border-palette-background active:bg-palette-primary active:text-palette-background",link:"text-palette-primary underline-offset-4 underline hover:no-underline"},size:{default:"w-full md:w-fit h-10 px-4 py-2",sm:"h-9 px-3",lg:"h-11 px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"primary",size:"default"}}),Og=de.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...o},i)=>{const a=r?Pa:"button";return ne.jsx(a,{className:$u(e,zx({variant:t,size:n})),ref:i,...o})});Og.displayName="Button";var R1=Object.defineProperty,$1=(e,t,n)=>t in e?R1(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,oo=(e,t,n)=>$1(e,typeof t!="symbol"?t+"":t,n),jv=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function D1(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Pp={exports:{}},eu={};/**
|
|
31
|
-
* @license React
|
|
32
|
-
* react-jsx-runtime.production.min.js
|
|
33
|
-
*
|
|
34
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
35
|
-
*
|
|
36
|
-
* This source code is licensed under the MIT license found in the
|
|
37
|
-
* LICENSE file in the root directory of this source tree.
|
|
38
|
-
*/var Bv;function M1(){if(Bv)return eu;Bv=1;var e=z,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function a(l,u,p){var m,_={},v=null,C=null;p!==void 0&&(v=""+p),u.key!==void 0&&(v=""+u.key),u.ref!==void 0&&(C=u.ref);for(m in u)r.call(u,m)&&!i.hasOwnProperty(m)&&(_[m]=u[m]);if(l&&l.defaultProps)for(m in u=l.defaultProps,u)_[m]===void 0&&(_[m]=u[m]);return{$$typeof:t,type:l,key:v,ref:C,props:_,_owner:o.current}}return eu.Fragment=n,eu.jsx=a,eu.jsxs=a,eu}var Td={};/**
|
|
39
|
-
* @license React
|
|
40
|
-
* react-jsx-runtime.development.js
|
|
41
|
-
*
|
|
42
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
43
|
-
*
|
|
44
|
-
* This source code is licensed under the MIT license found in the
|
|
45
|
-
* LICENSE file in the root directory of this source tree.
|
|
46
|
-
*/var Hv;function k1(){return Hv||(Hv=1,process.env.NODE_ENV!=="production"&&function(){var e=z,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),l=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),m=Symbol.for("react.suspense_list"),_=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),C=Symbol.for("react.offscreen"),b=Symbol.iterator,y="@@iterator";function N(Ee){if(Ee===null||typeof Ee!="object")return null;var ae=b&&Ee[b]||Ee[y];return typeof ae=="function"?ae:null}var R=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function O(Ee){{for(var ae=arguments.length,$e=new Array(ae>1?ae-1:0),Be=1;Be<ae;Be++)$e[Be-1]=arguments[Be];k("error",Ee,$e)}}function k(Ee,ae,$e){{var Be=R.ReactDebugCurrentFrame,at=Be.getStackAddendum();at!==""&&(ae+="%s",$e=$e.concat([at]));var xt=$e.map(function(_t){return String(_t)});xt.unshift("Warning: "+ae),Function.prototype.apply.call(console[Ee],console,xt)}}var I=!1,M=!1,Y=!1,ee=!1,re=!1,Z;Z=Symbol.for("react.module.reference");function U(Ee){return!!(typeof Ee=="string"||typeof Ee=="function"||Ee===r||Ee===i||re||Ee===o||Ee===p||Ee===m||ee||Ee===C||I||M||Y||typeof Ee=="object"&&Ee!==null&&(Ee.$$typeof===v||Ee.$$typeof===_||Ee.$$typeof===a||Ee.$$typeof===l||Ee.$$typeof===u||Ee.$$typeof===Z||Ee.getModuleId!==void 0))}function J(Ee,ae,$e){var Be=Ee.displayName;if(Be)return Be;var at=ae.displayName||ae.name||"";return at!==""?$e+"("+at+")":$e}function fe(Ee){return Ee.displayName||"Context"}function ge(Ee){if(Ee==null)return null;if(typeof Ee.tag=="number"&&O("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof Ee=="function")return Ee.displayName||Ee.name||null;if(typeof Ee=="string")return Ee;switch(Ee){case r:return"Fragment";case n:return"Portal";case i:return"Profiler";case o:return"StrictMode";case p:return"Suspense";case m:return"SuspenseList"}if(typeof Ee=="object")switch(Ee.$$typeof){case l:var ae=Ee;return fe(ae)+".Consumer";case a:var $e=Ee;return fe($e._context)+".Provider";case u:return J(Ee,Ee.render,"ForwardRef");case _:var Be=Ee.displayName||null;return Be!==null?Be:ge(Ee.type)||"Memo";case v:{var at=Ee,xt=at._payload,_t=at._init;try{return ge(_t(xt))}catch{return null}}}return null}var te=Object.assign,he=0,V,B,q,ie,H,j,Q;function F(){}F.__reactDisabledLog=!0;function w(){{if(he===0){V=console.log,B=console.info,q=console.warn,ie=console.error,H=console.group,j=console.groupCollapsed,Q=console.groupEnd;var Ee={configurable:!0,enumerable:!0,value:F,writable:!0};Object.defineProperties(console,{info:Ee,log:Ee,warn:Ee,error:Ee,group:Ee,groupCollapsed:Ee,groupEnd:Ee})}he++}}function T(){{if(he--,he===0){var Ee={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:te({},Ee,{value:V}),info:te({},Ee,{value:B}),warn:te({},Ee,{value:q}),error:te({},Ee,{value:ie}),group:te({},Ee,{value:H}),groupCollapsed:te({},Ee,{value:j}),groupEnd:te({},Ee,{value:Q})})}he<0&&O("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var P=R.ReactCurrentDispatcher,X;function ue(Ee,ae,$e){{if(X===void 0)try{throw Error()}catch(at){var Be=at.stack.trim().match(/\n( *(at )?)/);X=Be&&Be[1]||""}return`
|
|
47
|
-
`+X+Ee}}var pe=!1,se;{var Ce=typeof WeakMap=="function"?WeakMap:Map;se=new Ce}function Se(Ee,ae){if(!Ee||pe)return"";{var $e=se.get(Ee);if($e!==void 0)return $e}var Be;pe=!0;var at=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var xt;xt=P.current,P.current=null,w();try{if(ae){var _t=function(){throw Error()};if(Object.defineProperty(_t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(_t,[])}catch(wn){Be=wn}Reflect.construct(Ee,[],_t)}else{try{_t.call()}catch(wn){Be=wn}Ee.call(_t.prototype)}}else{try{throw Error()}catch(wn){Be=wn}Ee()}}catch(wn){if(wn&&Be&&typeof wn.stack=="string"){for(var gt=wn.stack.split(`
|
|
48
|
-
`),Ot=Be.stack.split(`
|
|
49
|
-
`),Wt=gt.length-1,Dt=Ot.length-1;Wt>=1&&Dt>=0&>[Wt]!==Ot[Dt];)Dt--;for(;Wt>=1&&Dt>=0;Wt--,Dt--)if(gt[Wt]!==Ot[Dt]){if(Wt!==1||Dt!==1)do if(Wt--,Dt--,Dt<0||gt[Wt]!==Ot[Dt]){var Gt=`
|
|
50
|
-
`+gt[Wt].replace(" at new "," at ");return Ee.displayName&&Gt.includes("<anonymous>")&&(Gt=Gt.replace("<anonymous>",Ee.displayName)),typeof Ee=="function"&&se.set(Ee,Gt),Gt}while(Wt>=1&&Dt>=0);break}}}finally{pe=!1,P.current=xt,T(),Error.prepareStackTrace=at}var mn=Ee?Ee.displayName||Ee.name:"",xr=mn?ue(mn):"";return typeof Ee=="function"&&se.set(Ee,xr),xr}function He(Ee,ae,$e){return Se(Ee,!1)}function le(Ee){var ae=Ee.prototype;return!!(ae&&ae.isReactComponent)}function ce(Ee,ae,$e){if(Ee==null)return"";if(typeof Ee=="function")return Se(Ee,le(Ee));if(typeof Ee=="string")return ue(Ee);switch(Ee){case p:return ue("Suspense");case m:return ue("SuspenseList")}if(typeof Ee=="object")switch(Ee.$$typeof){case u:return He(Ee.render);case _:return ce(Ee.type,ae,$e);case v:{var Be=Ee,at=Be._payload,xt=Be._init;try{return ce(xt(at),ae,$e)}catch{}}}return""}var ve=Object.prototype.hasOwnProperty,ke={},Pe=R.ReactDebugCurrentFrame;function Fe(Ee){if(Ee){var ae=Ee._owner,$e=ce(Ee.type,Ee._source,ae?ae.type:null);Pe.setExtraStackFrame($e)}else Pe.setExtraStackFrame(null)}function Qe(Ee,ae,$e,Be,at){{var xt=Function.call.bind(ve);for(var _t in Ee)if(xt(Ee,_t)){var gt=void 0;try{if(typeof Ee[_t]!="function"){var Ot=Error((Be||"React class")+": "+$e+" type `"+_t+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof Ee[_t]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw Ot.name="Invariant Violation",Ot}gt=Ee[_t](ae,_t,Be,$e,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Wt){gt=Wt}gt&&!(gt instanceof Error)&&(Fe(at),O("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",Be||"React class",$e,_t,typeof gt),Fe(null)),gt instanceof Error&&!(gt.message in ke)&&(ke[gt.message]=!0,Fe(at),O("Failed %s type: %s",$e,gt.message),Fe(null))}}}var st=Array.isArray;function dt(Ee){return st(Ee)}function At(Ee){{var ae=typeof Symbol=="function"&&Symbol.toStringTag,$e=ae&&Ee[Symbol.toStringTag]||Ee.constructor.name||"Object";return $e}}function Ae(Ee){try{return me(Ee),!1}catch{return!0}}function me(Ee){return""+Ee}function _e(Ee){if(Ae(Ee))return O("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",At(Ee)),me(Ee)}var De=R.ReactCurrentOwner,je={key:!0,ref:!0,__self:!0,__source:!0},Me,We,tt;tt={};function ht(Ee){if(ve.call(Ee,"ref")){var ae=Object.getOwnPropertyDescriptor(Ee,"ref").get;if(ae&&ae.isReactWarning)return!1}return Ee.ref!==void 0}function Et(Ee){if(ve.call(Ee,"key")){var ae=Object.getOwnPropertyDescriptor(Ee,"key").get;if(ae&&ae.isReactWarning)return!1}return Ee.key!==void 0}function Lt(Ee,ae){if(typeof Ee.ref=="string"&&De.current&&ae&&De.current.stateNode!==ae){var $e=ge(De.current.type);tt[$e]||(O('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',ge(De.current.type),Ee.ref),tt[$e]=!0)}}function Xe(Ee,ae){{var $e=function(){Me||(Me=!0,O("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",ae))};$e.isReactWarning=!0,Object.defineProperty(Ee,"key",{get:$e,configurable:!0})}}function qe(Ee,ae){{var $e=function(){We||(We=!0,O("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",ae))};$e.isReactWarning=!0,Object.defineProperty(Ee,"ref",{get:$e,configurable:!0})}}var lt=function(Ee,ae,$e,Be,at,xt,_t){var gt={$$typeof:t,type:Ee,key:ae,ref:$e,props:_t,_owner:xt};return gt._store={},Object.defineProperty(gt._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(gt,"_self",{configurable:!1,enumerable:!1,writable:!1,value:Be}),Object.defineProperty(gt,"_source",{configurable:!1,enumerable:!1,writable:!1,value:at}),Object.freeze&&(Object.freeze(gt.props),Object.freeze(gt)),gt};function et(Ee,ae,$e,Be,at){{var xt,_t={},gt=null,Ot=null;$e!==void 0&&(_e($e),gt=""+$e),Et(ae)&&(_e(ae.key),gt=""+ae.key),ht(ae)&&(Ot=ae.ref,Lt(ae,at));for(xt in ae)ve.call(ae,xt)&&!je.hasOwnProperty(xt)&&(_t[xt]=ae[xt]);if(Ee&&Ee.defaultProps){var Wt=Ee.defaultProps;for(xt in Wt)_t[xt]===void 0&&(_t[xt]=Wt[xt])}if(gt||Ot){var Dt=typeof Ee=="function"?Ee.displayName||Ee.name||"Unknown":Ee;gt&&Xe(_t,Dt),Ot&&qe(_t,Dt)}return lt(Ee,gt,Ot,at,Be,De.current,_t)}}var ot=R.ReactCurrentOwner,ct=R.ReactDebugCurrentFrame;function pt(Ee){if(Ee){var ae=Ee._owner,$e=ce(Ee.type,Ee._source,ae?ae.type:null);ct.setExtraStackFrame($e)}else ct.setExtraStackFrame(null)}var Ct;Ct=!1;function $t(Ee){return typeof Ee=="object"&&Ee!==null&&Ee.$$typeof===t}function Yt(){{if(ot.current){var Ee=ge(ot.current.type);if(Ee)return`
|
|
51
|
-
|
|
52
|
-
Check the render method of \``+Ee+"`."}return""}}function Kt(Ee){return""}var qt={};function fn(Ee){{var ae=Yt();if(!ae){var $e=typeof Ee=="string"?Ee:Ee.displayName||Ee.name;$e&&(ae=`
|
|
53
|
-
|
|
54
|
-
Check the top-level render call using <`+$e+">.")}return ae}}function dr(Ee,ae){{if(!Ee._store||Ee._store.validated||Ee.key!=null)return;Ee._store.validated=!0;var $e=fn(ae);if(qt[$e])return;qt[$e]=!0;var Be="";Ee&&Ee._owner&&Ee._owner!==ot.current&&(Be=" It was passed a child from "+ge(Ee._owner.type)+"."),pt(Ee),O('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',$e,Be),pt(null)}}function Cr(Ee,ae){{if(typeof Ee!="object")return;if(dt(Ee))for(var $e=0;$e<Ee.length;$e++){var Be=Ee[$e];$t(Be)&&dr(Be,ae)}else if($t(Ee))Ee._store&&(Ee._store.validated=!0);else if(Ee){var at=N(Ee);if(typeof at=="function"&&at!==Ee.entries)for(var xt=at.call(Ee),_t;!(_t=xt.next()).done;)$t(_t.value)&&dr(_t.value,ae)}}}function Zo(Ee){{var ae=Ee.type;if(ae==null||typeof ae=="string")return;var $e;if(typeof ae=="function")$e=ae.propTypes;else if(typeof ae=="object"&&(ae.$$typeof===u||ae.$$typeof===_))$e=ae.propTypes;else return;if($e){var Be=ge(ae);Qe($e,Ee.props,"prop",Be,Ee)}else if(ae.PropTypes!==void 0&&!Ct){Ct=!0;var at=ge(ae);O("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",at||"Unknown")}typeof ae.getDefaultProps=="function"&&!ae.getDefaultProps.isReactClassApproved&&O("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function oa(Ee){{for(var ae=Object.keys(Ee.props),$e=0;$e<ae.length;$e++){var Be=ae[$e];if(Be!=="children"&&Be!=="key"){pt(Ee),O("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",Be),pt(null);break}}Ee.ref!==null&&(pt(Ee),O("Invalid attribute `ref` supplied to `React.Fragment`."),pt(null))}}function wr(Ee,ae,$e,Be,at,xt){{var _t=U(Ee);if(!_t){var gt="";(Ee===void 0||typeof Ee=="object"&&Ee!==null&&Object.keys(Ee).length===0)&&(gt+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var Ot=Kt();Ot?gt+=Ot:gt+=Yt();var Wt;Ee===null?Wt="null":dt(Ee)?Wt="array":Ee!==void 0&&Ee.$$typeof===t?(Wt="<"+(ge(Ee.type)||"Unknown")+" />",gt=" Did you accidentally export a JSX literal instead of a component?"):Wt=typeof Ee,O("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Wt,gt)}var Dt=et(Ee,ae,$e,at,xt);if(Dt==null)return Dt;if(_t){var Gt=ae.children;if(Gt!==void 0)if(Be)if(dt(Gt)){for(var mn=0;mn<Gt.length;mn++)Cr(Gt[mn],Ee);Object.freeze&&Object.freeze(Gt)}else O("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Cr(Gt,Ee)}return Ee===r?oa(Dt):Zo(Dt),Dt}}function Zn(Ee,ae,$e){return wr(Ee,ae,$e,!0)}function _r(Ee,ae,$e){return wr(Ee,ae,$e,!1)}var lo=_r,ia=Zn;Td.Fragment=r,Td.jsx=lo,Td.jsxs=ia}()),Td}process.env.NODE_ENV==="production"?Pp.exports=M1():Pp.exports=k1();var an=Pp.exports;function P1(e){switch(e){case"AD":case"AM":case"AT":case"AX":case"AZ":case"BA":case"BY":case"CY":case"CZ":case"DK":case"DZ":case"EC":case"EH":case"ET":case"FI":case"FR":case"GE":case"GF":case"GI":case"GP":case"GW":case"HT":case"KE":case"KV":case"KW":case"LA":case"LU":case"MC":case"MD":case"ME":case"MG":case"MK":case"MQ":case"MZ":case"NC":case"NL":case"NO":case"PL":case"PT":case"PY":case"RE":case"RS":case"SA":case"SE":case"SJ":case"SM":case"SN":case"TC":case"TJ":case"TM":case"TN":case"TZ":case"UY":case"VG":case"ZM":return[["line1"],["line2"],["postalCode","city"],["countryCode"]];case"AF":case"IR":return[["line1"],["line2"],["city"],["region"],["postalCode"],["countryCode"]];case"AG":case"AO":case"AW":case"BJ":case"BO":case"BS":case"BZ":case"CI":case"CW":case"DJ":case"FJ":case"GA":case"GH":case"GM":case"GY":case"JM":case"KI":case"LY":case"MW":case"NA":case"NR":case"PS":case"QA":case"RW":case"SC":case"SR":case"SX":case"TG":case"TT":case"UG":case"VU":return[["line1"],["line2"],["city"],["countryCode"]];case"AL":case"EE":case"IS":return[["line1"],["line2"],["postalCode","city"]];case"AR":return[["line1"],["line2"],["postalCode","city",",","region"],["countryCode"]];case"AS":case"BB":case"BD":case"BM":case"BN":case"BT":case"CR":case"DO":case"FK":case"FM":case"GR":case"GU":case"JO":case"KZ":case"LB":case"LK":case"LS":case"MA":case"MH":case"MM":case"MR":case"MT":case"MV":case"NG":case"PG":case"PK":case"PR":case"RO":case"SG":case"VC":case"WS":return[["line1"],["line2"],["city","postalCode"],["countryCode"]];case"AU":case"CA":case"SZ":case"US":case"VI":return[["line1"],["line2"],["city",",","region","postalCode"],["countryCode"]];case"BE":case"PE":return[["line1"],["line2"],["postalCode","sublocality","city"],["countryCode"]];case"BF":case"BI":case"BQ":case"BW":case"CF":case"CG":case"CM":case"DM":case"ER":case"GQ":case"KM":case"ML":case"SY":case"TD":case"ZW":return[["line1"],["line2"],["city"],["region"],["countryCode"]];case"BG":return[["line1"],["postalCode","region"],["countryCode"]];case"BH":return[["line1"],["line2"],["sublocality","city"],["countryCode"]];case"BR":return[["line1"],["line2"],["sublocality"],["city","region"],["postalCode"],["countryCode"]];case"CH":case"DE":case"GT":case"IT":case"LI":case"MY":case"NI":case"OM":case"SK":case"VA":return[["line1"],["line2"],["postalCode","city","region"],["countryCode"]];case"CL":case"PF":return[["line1"],["line2"],["city","postalCode","region"],["countryCode"]];case"CN":return[["region","city","sublocality"],["line1"],["line2"],["countryCode"]];case"CO":case"ID":case"IQ":case"KH":case"MP":case"NP":case"PW":case"UA":return[["line1"],["line2"],["city","region","postalCode"],["countryCode"]];case"EG":return[["line1"],["line2"],["sublocality","city","region","postalCode"],["countryCode"]];case"ES":case"IL":return[["line1"],["line2"],["city","postalCode"],["region"],["countryCode"]];case"GB":case"MN":case"ZA":return[["line1"],["line2"],["sublocality","city","postalCode"],["countryCode"]];case"GG":case"IM":case"JE":return[["line1"],["line2"],["sublocality"],["city"],["postalCode"],["countryCode"]];case"GN":return[["line1","line2","city"],["countryCode"]];case"HK":return[["line1"],["line2"],["sublocality"],["city"],["region"],["countryCode"]];case"HR":return[["line1"],["postalCode","city","region"],["countryCode"]];case"HU":case"SI":return[["postalCode","city"],["line1"],["line2"],["countryCode"]];case"IE":return[["line1"],["line2"],["sublocality"],["city","region","postalCode"],["countryCode"]];case"IN":case"VE":return[["line1"],["line2"],["city","postalCode"],["region"],["countryCode"]];case"JP":return[["line2"],["line1","sublocality"],["city","region"],["postalCode"],["countryCode"]];case"KR":return[["countryCode"],["region","city","sublocality","line1"],["line2"],["postalCode"]];case"KY":return[["line1"],["line2"],["postalCode"],["countryCode"]];case"LT":return[["line1"],["postalCode","city","sublocality","region"],["countryCode"]];case"LV":return[["line1"],["city",",","postalCode"],["countryCode"]];case"MO":return[["line1"],["line2"],["sublocality"],["city"],["countryCode"]];case"MU":return[["line1"],["line2"],["city"],["region","postalCode"],["countryCode"]];case"MX":return[["line1"],["line2"],["sublocality"],["postalCode","city",",","region"],["countryCode"]];case"NE":case"SD":return[["line1"],["line2"],["postalCode"],["city"],["region"],["countryCode"]];case"NZ":return[["line1"],["line2"],["sublocality"],["city"],["postalCode"],["countryCode"]];case"PH":case"TW":case"VN":return[["line1"],["line2"],["sublocality","city"],["region","postalCode"],["countryCode"]];case"RU":return[["line1"],["line2"],["city"],["postalCode"],["countryCode"]];case"SB":case"SL":case"ST":case"TL":case"TO":case"TV":return[["line1"],["line2"],["city",",","region"],["countryCode"]];case"TH":case"TR":return[["line1"],["line2"],["sublocality"],["postalCode","city"],["countryCode"]];case"UZ":return[["line1"],["line2"],["region","postalCode"],["countryCode"]]}return[["line1","line2"],["city","region","postalCode"],["countryCode"]]}const I1={GOOGLEMYBUSINESS:"GOOGLEMYBUSINESS"},Wv={GOOGLE:"google",APPLE:"apple",BING:"bing"},L1=(e,t)=>{const n={region:"localizedRegionName",countryCode:"localizedCountryName"}[e];return n&&t[n]},F1=(e,t=[],n,r={route:!1})=>{const o="Failed to construct query for maps service.";let i=e&&zv([e.line1,e.line2,e.city,e.region,e.postalCode,e.countryCode]);switch(r.provider){case Wv.APPLE:{if(!i){console.warn(`${o} Check that you've provided a valid Yext Address.`);break}return j1(i,r.route)}case Wv.BING:{if(i=e&&zv([e.line1,e.city,e.region,e.postalCode]),!i){console.warn(`${o} Check that you've provided a valid Yext Address.`);break}return B1(i,r.route)}default:{const a=t.find(l=>{var u;return((u=l==null?void 0:l.publisher)==null?void 0:u.toUpperCase())===I1.GOOGLEMYBUSINESS});if(a!=null&&a.listingUrl)return a.listingUrl;if(!i){console.warn(`${o} Check that you've provided a valid Yext Address, Yext ListingType, or Google Place ID.`);break}return H1(i,r.route)}}},j1=(e,t)=>t?`https://maps.apple.com/?daddr=${e}`:`https://maps.apple.com/?address=${e}`,B1=(e,t)=>t?`https://bing.com/maps/default.aspx?rtp=adr.${e}`:`https://bing.com/maps/default.aspx?where1=${e}`,H1=(e,t)=>t?`https://maps.google.com/maps/dir/?api=1&destination=${e}`:`https://maps.google.com/maps/search/?api=1&query=${e}`,zv=(e=[])=>{if(!e.length)return"";const t=e.filter(Boolean).join(", ");return encodeURI(t)},W1=({address:e,lines:t,separator:n=",",...r})=>{const o=(t||P1(e.countryCode)).map(i=>an.jsx(z1,{address:e,line:i,separator:n},i.toString()));return z.createElement("div",{...r,key:e.toString()},o)},z1=({address:e,line:t,separator:n})=>{const r=[];for(const o of t){if(o===","){r.push(an.jsx("span",{children:n},o));continue}const i=e[o];if(!i)continue;const a=L1(o,e);if(a){r.push(an.jsxs(de.Fragment,{children:[" ",an.jsx("abbr",{title:a,children:i})]},o));continue}r.push(an.jsx("span",{children:" "+i},o))}return an.jsx("div",{className:"address-line",children:r})};var Zl={};Object.defineProperty(Zl,"__esModule",{value:!0});var K1=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},G1=typeof window<"u"&&typeof window.document<"u",U1=typeof process<"u"&&process.versions!=null&&process.versions.node!=null,V1=(typeof self>"u"?"undefined":K1(self))==="object"&&self.constructor&&self.constructor.name==="DedicatedWorkerGlobalScope",Y1=typeof window<"u"&&window.name==="nodejs"||typeof navigator<"u"&&(navigator.userAgent.includes("Node.js")||navigator.userAgent.includes("jsdom")),q1=typeof Deno<"u"&&typeof Deno.version<"u"&&typeof Deno.version.deno<"u",Kv=Zl.isBrowser=G1;Zl.isWebWorker=V1;var Z1=Zl.isNode=U1;Zl.isJsDom=Y1;var J1=Zl.isDeno=q1;class X1{constructor(){oo(this,"name"),oo(this,"isServerSide"),oo(this,"version");var t;J1?(this.name="deno",this.version="",Kv&&(this.version=((t=window.Deno)==null?void 0:t.version.deno)||""),this.isServerSide=!0):Z1?(this.name="node",this.version=process.versions.node,this.isServerSide=!0):Kv?(this.name="browser",this.version=navigator.userAgent,this.isServerSide=!1):(this.name="unknown",this.version="",this.isServerSide=!1)}getNodeMajorVersion(){if(this.name!=="node")throw new Error("Not running in Node.");return+this.version.split(".")[0]}}const Kx=()=>new X1,Q1=z.createContext(null);z.lazy(()=>Promise.resolve().then(()=>require("./debugger-DIg74Hi7-CWHlc9g3.cjs")));const eO=z.createContext({name:""}),tO=()=>z.useContext(eO).name;function nO(){const e=z.useContext(Q1);if(!e)return e;Kx().name==="browser"&&!window.setAnalyticsOptIn&&(window.setAnalyticsOptIn=async()=>{await e.optIn()});const t=tO();return{getDebugEnabled(){return e.getDebugEnabled()},identify(n){return e.identify(n)},optIn(){return e.optIn()},pageView(){return e.pageView()},track(n){return e.track({...n,scope:n.scope??t})}}}const ys={INTRINSIC:"intrinsic",FIXED:"fixed",ASPECT:"aspect",FILL:"fill"},rO=e=>{const t=e.protocol.slice(0,-1);if(t!=="http"&&t!=="https"){console.error(`Invalid scheme: ${e}`);return}const n=e.hostname;let r;if(n==="a.mktgcdn.com")r="us";else{if(n.replace("a.","").replace(".mktgcdn.com","")!=="eu"){console.error(`Invalid host: ${e}`);return}r="eu"}if(!e.pathname.startsWith("/f")){console.error(`Invalid path: ${e}`);return}const o=e.pathname.replace(/^\//,"").split("/");if(o.length<2||o.length>3){console.error(`Invalid path: ${e}`);return}let i;if(o[0]==="f")i="prod";else switch(o[0].replace("f-","")){case"sandbox":{i="sbx";break}case"qa":{i="qa";break}case"dev":{i="dev";break}default:{console.error(`Invalid path: ${e}`);return}}if(r==="eu"&&(i==="dev"||i==="sbx")){console.error(`Invalid path: ${e}`);return}let a;if(o.length===3&&(a=parseInt(o[1]),Number.isNaN(a))){console.error(`Invalid account id: ${e}`);return}const l=o[o.length-1].split("."),u=l.length===2?`.${l[1]}`:"",p=l[0];return{scheme:t,partition:r,env:i,accountId:a,contentHash:p,extension:u}},oO=(e,t,n)=>{const r=`https://dyn${e.partition==="us"?"":`.${e.partition}`}.mktgcdn.com`;let o="f";switch(e.env){case"prod":break;case"sbx":{o+="-sandbox";break}default:o+=`-${e.env.toString()}`}const i=e.accountId!==void 0?`${e.accountId}/`:"";return`${r}/${o}/${i}${e.contentHash}${e.extension}/width=${Math.round(t)},height=${Math.round(n)}`},iO=e=>{const t=e.protocol.slice(0,-1);if(t!=="http"&&t!=="https"){console.error(`Invalid scheme: ${e}`);return}if(e.hostname!=="a.mktgcdn.com"){console.error(`Invalid host: ${e}`);return}if(!e.pathname.startsWith("/p")){console.error(`Invalid path: ${e}`);return}const n=e.pathname.replace(/^\//,"").split("/");if(n.length<3||n.length>4){console.error(`Invalid path: ${e}`);return}let r;if(n[0]==="p")r="prod";else switch(n[0].replace("p-","")){case"sandbox":{r="sbx";break}case"qa":{r="qa";break}case"dev":{r="dev";break}default:{console.error(`Invalid path: ${e}`);return}}const o=n[1];let i;if(n.length===4){if(!n[2].includes(".")){console.error(`Invalid aspect ratio: ${e}`);return}if(i=parseFloat(n[2]),Number.isNaN(i)||n[2].split(".")[1].length!==4){console.error(`Invalid aspect ratio: ${e}`);return}}const a=n[n.length-1].split("."),l=a.length===2?`.${a[1]}`:"",u=a[0];return{scheme:t,env:r,contentHash:o,aspectRatio:i,name:u,extension:l}},aO=(e,t,n)=>{const r="https://dyn.mktgcdn.com";let o="p";switch(e.env){case"prod":break;case"sbx":{o+="-sandbox";break}default:o+=`-${e.env.toString()}`}return`${r}/${o}/${e.contentHash}/width=${Math.round(t)},height=${Math.round(n)}`},Ip=(e,t,n)=>{if(!Gx(e)){console.error(`Invalid image url: ${e}.`);return}const r=new URL(e);if(r.pathname.startsWith("/p")){const o=iO(r);if(o)return aO(o,t,n)}else if(r.pathname.startsWith("/f")){const o=rO(r);if(o)return oO(o,t,n)}return e},Gx=e=>{let t;try{t=new URL(e)}catch{return!1}return t.protocol==="http:"||t.protocol==="https:"},sO=({image:e,className:t,width:n,height:r,aspectRatio:o,layout:i=ys.INTRINSIC,placeholder:a,imgOverrides:l,style:u={},loading:p="lazy"})=>{const m=z.useRef(null),[_,v]=z.useState(!1),C="image"in e?e.image:e;z.useEffect(()=>{var re;(re=m.current)!=null&&re.complete&&v(!0)},[]),lO(i,C.width,C.height,n,r,o);const b=Math.abs(C.width);b||console.warn("Invalid image width.");const y=Math.abs(C.height);if(y||console.warn("Invalid image height."),!Gx(C.url))return console.error(`Invalid image url: ${C.url}`),an.jsx(an.Fragment,{children:a!=null&&a});const N=n&&n>0?n:void 0,R=r&&r>0?r:void 0,{src:O,imgStyle:k,widths:I}=cO(i,b,y,u,C.url,N,R,o),M=I.map(re=>`${Ip(C.url,re,y/b*re)} ${re}w`).join(", "),Y=[640,768,1024,1280,1536],ee=I.map((re,Z)=>Z===I.length-1?`${re}px`:`(max-width: ${Y[Z]}px) ${re}px`).join(", ");return an.jsxs(an.Fragment,{children:[!_&&a!=null&&a,an.jsx("img",{ref:m,style:k,src:O,className:t,width:N,height:R,srcSet:M,sizes:ee,loading:p,alt:C.alternateText||"",...l})]})},lO=(e,t,n,r,o,i)=>{if(t<0&&console.warn(`Invalid image width: ${t}.`),n<0&&console.warn(`Invalid image height: ${n}.`),e===ys.FIXED){if(!r&&!o){console.warn("Using fixed layout but neither width nor height is passed as props.");return}r&&r<0&&console.warn(`Using fixed layout but width is invalid: ${r}.`),o&&o<0&&console.warn(`Using fixed layout but height is invalid: ${o}.`);return}(r||o)&&console.warn("Width or height is passed in but layout is not fixed. These will have no impact. If you want to have a fixed height or width then set layout to fixed."),e===ys.ASPECT&&!i&&console.warn("Using aspect layout but aspectRatio is not passed as a prop.")},cO=(e,t,n,r,o,i,a,l)=>{let u=[100,320,640,960,1280,1920],p=Ip(o,500,500);const m={...r};switch(m.objectFit=m.objectFit||"cover",m.objectPosition=m.objectPosition||"center",e){case ys.INTRINSIC:m.maxWidth=t,m.width="100%",m.aspectRatio=l?`${l}`:`${t} / ${n}`;break;case ys.FIXED:{const{fixedWidth:_,fixedHeight:v,fixedWidths:C}=uO(t,n,u,i,a);m.width=_,m.height=v,u=C,p=Ip(o,_,v);break}case ys.ASPECT:m.aspectRatio=l?`${l}`:`${t} / ${n}`;break;case ys.FILL:m.width="100%",m.aspectRatio=l?`${l}`:`${t} / ${n}`;break;default:console.warn(`Unrecognized layout: ${e}.`);break}return{src:p,imgStyle:m,widths:u}},uO=(e,t,n,r,o)=>r&&o?{fixedWidth:r,fixedHeight:o,fixedWidths:[r]}:r?{fixedWidth:r,fixedHeight:r*t/e,fixedWidths:[r]}:o?{fixedWidth:o/t*e,fixedHeight:o,fixedWidths:[o/t*e]}:{fixedWidth:e,fixedHeight:t,fixedWidths:n};var Ux={exports:{}};/*!
|
|
55
|
-
Copyright (c) 2018 Jed Watson.
|
|
56
|
-
Licensed under the MIT License (MIT), see
|
|
57
|
-
http://jedwatson.github.io/classnames
|
|
58
|
-
*/(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var r=[],o=0;o<arguments.length;o++){var i=arguments[o];if(i){var a=typeof i;if(a==="string"||a==="number")r.push(i);else if(Array.isArray(i)){if(i.length){var l=n.apply(null,i);l&&r.push(l)}}else if(a==="object"){if(i.toString!==Object.prototype.toString&&!i.toString.toString().includes("[native code]")){r.push(i.toString());continue}for(var u in i)t.call(i,u)&&i[u]&&r.push(u)}}}return r.join(" ")}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(Ux);var dO=Ux.exports;const Cu=D1(dO),Gv=e=>e.linkType==="Email"||!e.linkType&&Vx(e.link)?e.link.startsWith("mailto:")?e.link:`mailto:${e.link}`:e.linkType==="Phone"?e.link.startsWith("tel:")?e.link:`tel:${e.link}`:e.link,Vx=e=>e.startsWith("mailto:")?!0:/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(e),fO=e=>"href"in e,Yx=z.forwardRef(function(e,t){const n=fO(e)?{link:e.href}:e.cta,{children:r,onClick:o,className:i,eventName:a,scope:l,currency:u,amount:p,cta:m,obfuscate:_,...v}=e,C=m?"CTA_CLICK":"LINK",b=a||(m?"cta":"link"),y=nO(),N=_||_!==!1&&Vx(n.link),R=async I=>{const M=I.currentTarget;let Y="";if(N){I.preventDefault();const ee=M.href.split("/").at(-1);ee&&(Y=atob(ee))}if(y!==null)try{await y.track({action:C,scope:e.scope,eventName:b,currency:u,amount:p,destinationUrl:Y||M.href})}catch{console.error("Failed to report click Analytics Event")}o&&o(I),Y&&(window.location.href=Y)},O=N?"Obfuscated, set a label or child":n.link,k={className:Cu("Link",i),href:N?btoa(Gv(n)):Gv(n),onClick:R,rel:e.target&&!e.rel?"noopener":void 0,ref:t};return y!=null&&y.getDebugEnabled()&&(k["data-ya-action"]=C,k["data-ya-scopeoverride"]=l,k["data-ya-eventname"]=b),an.jsx("a",{...k,...v,suppressHydrationWarning:!0,children:r||n.label||O})}),br=Object.freeze({DEGREE:Symbol("deg"),KILOMETER:Symbol("km"),MILE:Symbol("mi"),RADIAN:Symbol("r")}),Sd=Object.freeze({MERCATOR:Symbol("mercator"),SPHERICAL:Symbol("spherical")}),Oh=3959,Ah=6371,hO=["latitude","lat"],pO=["longitude","lon","lng","long"];function Uv(e,t){for(const n of t)if(e[n]||e[n]===0)return e[n]}function Vv(e){switch(typeof e){case"string":case"number":const t=Number.parseFloat(e);if(Number.isNaN(t))throw new Error(`'${e}' must be convertible to a Number'`);return t;default:throw new Error(`typeof '${e}' must be a number or a string that can be converted to a number, is '${typeof e}'`)}}function bs(e){return e*Math.PI/180}function Wi(e){return e/Math.PI*180}function gO(e,t){const n=bs(e.latitude),r=bs(t.latitude),o=r-n,i=bs(t.longitude-e.longitude),a=Math.pow(Math.sin(o/2),2)+Math.cos(n)*Math.cos(r)*Math.pow(Math.sin(i/2),2);return 2*Math.atan2(Math.sqrt(a),Math.sqrt(1-a))}function mO(e,t){const n=Math.tan(Math.PI/360*(e+90)),r=Math.tan(Math.PI/360*(t+90));return Math.log(r/n)}function vO(e,t){const n=Math.tan(Math.PI/360*(e+90))*Math.pow(Math.E,t);return Math.atan(n)*360/Math.PI-90}class Jl{constructor(t,n){let r=t;typeof t=="object"&&(r=Uv(t,hO),n=Uv(t,pO),r=typeof r=="function"?r():r,n=typeof n=="function"?n():n),this.latitude=r,this.longitude=n}get latitude(){return this._lat}get longitude(){return this._lon}get normalLon(){return((this._lon+180)%360+360)%360-180}set latitude(t){this._lat=Math.max(-90,Math.min(Vv(t),90))}set longitude(t){this._lon=Vv(t)}add(t,n,r=br.DEGREE,o=Sd.SPHERICAL){if(o===Sd.MERCATOR&&(r===br.DEGREE||r===br.RADIAN)){const i=r===br.DEGREE?bs(t):t,a=r===br.DEGREE?n:Wi(n);this.latitude=vO(this.latitude,i),this.longitude+=a}else switch(r){case br.DEGREE:this.latitude+=t,this.longitude+=n;break;case br.KILOMETER:this.latitude+=Wi(t)*Ah,this.longitude+=Wi(n)*Ah*Math.cos(bs(this.latitude));break;case br.MILE:this.latitude+=Wi(t)*Oh,this.longitude+=Wi(n)*Oh*Math.cos(bs(this.latitude));break;case br.RADIAN:this.latitude+=Wi(t),this.longitude+=Wi(n);break;default:throw new Error(`unit unhandled: ${r}`)}}distanceTo(t,n=br.MILE,r=Sd.SPHERICAL){if(r===Sd.MERCATOR&&(n===br.DEGREE||n===br.RADIAN)){const o=mO(this.latitude,t.latitude),i=Math.abs(t.normalLon-this.normalLon),a=bs(Math.min(i,360-i)),l=Math.sqrt(Math.pow(o,2)+Math.pow(a,2));switch(n){case br.DEGREE:return Wi(l);case br.RADIAN:return l;default:throw new Error(`unit unhandled: ${n}`)}}else{const o=gO(this,t);switch(n){case br.DEGREE:return Wi(o);case br.KILOMETER:return o*Ah;case br.MILE:return o*Oh;case br.RADIAN:return o;default:throw new Error(`unit unhandled: ${n}`)}}}equals(t){return t&&t.latitude===this.latitude&&t.longitude===this.longitude}searchQueryString(){return`${this.latitude},${this.longitude}`}}function qx(e,t=()=>null){const n=document.createElement("script");n.async=!0,n.onload=t,n.src=e,document.head.appendChild(n)}const jl={UNDEFINED:"undefined",NULL:"object",BOOLEAN:"boolean",NUMBER:"number",BIGINT:"bigint",STRING:"string",SYMBOL:"symbol",FUNCTION:"function",OBJECT:"object"};function Bl(e,t){if(typeof e!==t)throw new Error(`Expected an object of type '${t}' but received '${typeof e}'`)}function Ul(e,t){let n;try{n=e instanceof t}catch{throw new Error("Assertion error: 'instanceClass' is not a valid constructor")}if(!n)throw new Error(`Expected an instance of '${t.name}' but received '${e.constructor.name}'`)}class yO{constructor(t,n){Ul(t,Rg),Ul(n,HTMLElement),this.providerMapClass=t.getMapClass(),this.wrapper=n,this.controlEnabled=!0,this.panHandler=()=>null,this.panStartHandler=()=>null,this.providerOptions={}}withControlEnabled(t){return this.controlEnabled=t,this}withPanHandler(t){return Bl(t,jl.FUNCTION),this.panHandler=t,this}withPanStartHandler(t){return Bl(t,jl.FUNCTION),this.panStartHandler=t,this}withProviderOptions(t){return this.providerOptions=t,this}build(){const t=this.providerMapClass;return new t(this)}}class Xl{constructor(t){Ul(t,yO),this._panHandler=t.panHandler,this._panStartHandler=t.panStartHandler}getCenter(){throw new Error("not implemented")}getZoom(){throw new Error("not implemented")}setCenter(t,n){throw new Error("not implemented")}setZoom(t,n){throw new Error("not implemented")}setZoomCenter(t,n,r){this.setZoom(t,r),this.setCenter(n,r)}}class bO{constructor(t){Ul(t,Rg),this.providerPinClass=t.getPinClass(),this.clickHandler=()=>null,this.focusHandler=n=>null,this.hoverHandler=n=>null,this.icons={}}withClickHandler(t){return Bl(t,jl.FUNCTION),this.clickHandler=t,this}withFocusHandler(t){return Bl(t,jl.FUNCTION),this.focusHandler=t,this}withHoverHandler(t){return Bl(t,jl.FUNCTION),this.hoverHandler=t,this}withIcons(t){return this.icons=t,this}build(){const t=this.providerPinClass;return new t(this)}}class Ag{constructor(t){Ul(t,bO),this._clickHandler=t.clickHandler,this._focusHandler=t.focusHandler,this._hoverHandler=t.hoverHandler,this._icons=t.icons}setCoordinate(t){throw new Error("not implemented")}setMap(t,n){throw new Error("not implemented")}setProperties(t){throw new Error("not implemented")}}const _O=Object.freeze({backgroundPosition:"center",backgroundRepeat:"no-repeat",backgroundSize:"contain",left:"0",outline:"none",pointerEvents:"auto",position:"absolute",top:"0"});class Of extends Ag{static get baseStyle(){return _O}constructor(t){super(t),this._pinEl=document.createElement("button"),Object.assign(this._pinEl.style,this.constructor.baseStyle),this._pinAlt=document.createElement("span"),this._pinAlt.classList.add("sr-only"),this._pinEl.appendChild(this._pinAlt),this._wrapper=document.createElement("div"),this._wrapper.style.pointerEvents="none",this._wrapper.appendChild(this._pinEl),this.addListeners()}addListeners(){this._wrapper.addEventListener("click",()=>this._clickHandler()),this._wrapper.addEventListener("focusin",()=>this._focusHandler(!0)),this._wrapper.addEventListener("focusout",()=>this._focusHandler(!1)),this._wrapper.addEventListener("mouseover",()=>this._hoverHandler(!0)),this._wrapper.addEventListener("mouseout",()=>this._hoverHandler(!1))}getPinElement(){return this._pinEl}getWrapperElement(){return this._wrapper}setProperties(t){this.setElementProperties(t);const n=t.getClass(),r=t.getElement()||this._pinEl,o=t.getZIndex();r.style.pointerEvents="auto",this._wrapper&&(this._wrapper.style.zIndex=o,this._wrapper.setAttribute("class",n),r!==this._wrapper.children[0]&&(this._wrapper.children[0].style.pointerEvents="",this._wrapper.removeChild(this._wrapper.children[0]),this._wrapper.appendChild(r)))}setElementProperties(t){const n=t.getAnchorX(),r=t.getAnchorY(),o=t.getHeight(),i=this._icons[t.getIcon()],a=t.getSRText(),l=t.getWidth();Object.assign(this._pinEl.style,{backgroundImage:i?`url("${i}")`:"",height:o+"px",transform:`translate(${-100*n}%, ${-100*r}%)`,width:l+"px"}),this._pinAlt.innerText=a}}class Ts{constructor(){this.loadFunction=(t,n,r,o)=>t(),this.mapClass=Xl,this.pinClass=Ag,this.providerName=""}withLoadFunction(t){return Bl(t,jl.FUNCTION),this.loadFunction=t,this}withMapClass(t){return this.mapClass=t,this}withPinClass(t){return this.pinClass=t,this}withProviderName(t){return this.providerName=t,this}build(){return new Rg(this)}}class Rg{constructor(t){Ul(t,Ts),this._loadFunction=t.loadFunction,this._mapClass=t.mapClass,this._pinClass=t.pinClass,this._providerName=t.providerName,this._loadPromise=new Promise((n,r)=>{this._resolveLoad=n,this._rejectLoad=r}),this._apiKey="",this._loadInvoked=!1,this._loaded=!1,this._options={}}get loaded(){return this._loaded}getMapClass(){return this._mapClass}getPinClass(){return this._pinClass}getProviderName(){return this._providerName}async load(t=this._apiKey,n=this._options){this._loadInvoked||(this._loadInvoked=!0,this._loadFunction(this._resolveLoad,this._rejectLoad,t,n)),await this.ready(),this._loaded=!0}async ready(){await this._loadPromise}setLoadOptions(t,n=null){this._loadInvoked||(this._apiKey=t,this._options=n||this._options)}}const Yv={GEOCODER:"geocoder",PLACES:"places"};class xO extends Xl{constructor(t){super(t),this.map=new google.maps.Map(t.wrapper,{disableDefaultUI:!t.controlEnabled,fullscreenControl:!1,gestureHandling:t.controlEnabled?"auto":"none",mapTypeControl:!1,rotateControl:!1,scaleControl:!1,streetViewControl:!1,zoomControl:t.controlEnabled,zoomControlOptions:{position:google.maps.ControlPosition.RIGHT_TOP},...t.providerOptions}),this._moving=!1,google.maps.event.addListener(this.map,"bounds_changed",()=>{this._moving||(this._moving=!0,this._panStartHandler())}),google.maps.event.addListener(this.map,"idle",()=>{this._moving=!1,this._panHandler()})}getCenter(){return new Jl(this.map.getCenter())}getZoom(){return this.map.getZoom()}setCenter(t,n){const r=new google.maps.LatLng(t.latitude,t.longitude);n?this.map.panTo(r):this.map.setCenter(r)}setZoom(t,n){this.map.setZoom(Math.floor(t))}setZoomCenter(t,n,r){this.setCenter(n,r),this.setZoom(t,r)}}class EO extends Of{constructor(t){super(t),this._wrapper.style.position="absolute",google.maps.OverlayView.preventMapHitsAndGesturesFrom(this._wrapper);const n=this;class r extends google.maps.OverlayView{draw(){var i;const a=(i=this.getProjection())==null?void 0:i.fromLatLngToDivPixel(n._latLng);a&&(n._wrapper.style.left=a.x+"px",n._wrapper.style.top=a.y+"px")}onAdd(){this.getPanes().floatPane.appendChild(n._wrapper)}onRemove(){var i;(i=n._wrapper.parentNode)==null||i.removeChild(n._wrapper)}}this.pin=new r}setCoordinate(t){this._latLng=new google.maps.LatLng(t.latitude,t.longitude),this.pin.draw()}setMap(t,n){this.pin.setMap(t?t.getProviderMap().map:null)}}const qv="GoogleMapsCallback_b7d77ff2",CO="https://maps.googleapis.com/maps/api/js";function wO(e,t,n,{autocomplete:r=!1,channel:o=window.location.hostname,client:i,language:a,region:l,libraries:u=[],loading:p="async",params:m={}}={}){window[qv]=e,r&&u.push(Yv.GEOCODER,Yv.PLACES);const _={callback:qv,channel:o,libraries:u.join(","),...m};n&&(_.key=n),i&&(_.client=i),a&&(_.language=a),l&&(_.region=l),p&&(_.loading=p),qx(CO+"?"+Object.entries(_).map(([v,C])=>v+"="+C).join("&"))}new Ts().withLoadFunction(wO).withMapClass(xO).withPinClass(EO).withProviderName("Google").build();z.createContext(null);z.createContext(null);var Rh={},tu={},Zv;function NO(){if(Zv)return tu;Zv=1;var e=z;const t=e.createContext(null);function n(o,i){let a=null;o!=null&&(a=o[1]);function l(){return i??(a!=null?a.getTheme():null)}return{getTheme:l}}function r(){const o=e.useContext(t);if(o==null)throw Error("LexicalComposerContext.useLexicalComposerContext: cannot find a LexicalComposerContext");return o}return tu.LexicalComposerContext=t,tu.createLexicalComposerContext=n,tu.useLexicalComposerContext=r,tu}var nu={},Jv;function TO(){if(Jv)return nu;Jv=1;var e=z;function t(r){let o=new URLSearchParams;o.append("code",r);for(let i=1;i<arguments.length;i++)o.append("v",arguments[i]);throw Error(`Minified Lexical error #${r}; visit https://lexical.dev/docs/error?${o} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}let n=e.createContext(null);return nu.LexicalComposerContext=n,nu.createLexicalComposerContext=function(r,o){let i=null;return r!=null&&(i=r[1]),{getTheme:function(){return o??(i!=null?i.getTheme():null)}}},nu.useLexicalComposerContext=function(){let r=e.useContext(n);return r==null&&t(8),r},nu}var Xv,Qv;function ur(){return Qv||(Qv=1,Xv=process.env.NODE_ENV==="development"?NO():TO()),Xv}var Ge={},ey;function SO(){if(ey)return Ge;ey=1;function e(g){return{type:g}}const t=e("SELECTION_CHANGE_COMMAND"),n=e("CLICK_COMMAND"),r=e("DELETE_CHARACTER_COMMAND"),o=e("INSERT_LINE_BREAK_COMMAND"),i=e("INSERT_PARAGRAPH_COMMAND"),a=e("CONTROLLED_TEXT_INSERTION_COMMAND"),l=e("PASTE_COMMAND"),u=e("REMOVE_TEXT_COMMAND"),p=e("DELETE_WORD_COMMAND"),m=e("DELETE_LINE_COMMAND"),_=e("FORMAT_TEXT_COMMAND"),v=e("UNDO_COMMAND"),C=e("REDO_COMMAND"),b=e("KEYDOWN_COMMAND"),y=e("KEY_ARROW_RIGHT_COMMAND"),N=e("MOVE_TO_END"),R=e("KEY_ARROW_LEFT_COMMAND"),O=e("MOVE_TO_START"),k=e("KEY_ARROW_UP_COMMAND"),I=e("KEY_ARROW_DOWN_COMMAND"),M=e("KEY_ENTER_COMMAND"),Y=e("KEY_SPACE_COMMAND"),ee=e("KEY_BACKSPACE_COMMAND"),re=e("KEY_ESCAPE_COMMAND"),Z=e("KEY_DELETE_COMMAND"),U=e("KEY_TAB_COMMAND"),J=e("INSERT_TAB_COMMAND"),fe=e("INDENT_CONTENT_COMMAND"),ge=e("OUTDENT_CONTENT_COMMAND"),te=e("DROP_COMMAND"),he=e("FORMAT_ELEMENT_COMMAND"),V=e("DRAGSTART_COMMAND"),B=e("DRAGOVER_COMMAND"),q=e("DRAGEND_COMMAND"),ie=e("COPY_COMMAND"),H=e("CUT_COMMAND"),j=e("SELECT_ALL_COMMAND"),Q=e("CLEAR_EDITOR_COMMAND"),F=e("CLEAR_HISTORY_COMMAND"),w=e("CAN_REDO_COMMAND"),T=e("CAN_UNDO_COMMAND"),P=e("FOCUS_COMMAND"),X=e("BLUR_COMMAND"),ue=e("KEY_MODIFIER_COMMAND"),pe=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",se=pe&&"documentMode"in document?document.documentMode:null,Ce=pe&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),Se=pe&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),He=pe&&"InputEvent"in window&&!se?"getTargetRanges"in new window.InputEvent("input"):!1,le=pe&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),ce=pe&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,ve=pe&&/Android/.test(navigator.userAgent),ke=pe&&/^(?=.*Chrome).*/i.test(navigator.userAgent),Pe=pe&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&!ke,Fe=1,Qe=3,st=0,dt=1,At=2,Ae=0,me=1,_e=2,De=1,je=2,Me=4,We=8,tt=16,ht=32,Et=64,Lt=128,Xe=De|je|Me|We|tt|ht|Et|Lt,qe=1,lt=2,et=1,ot=2,ct=3,pt=4,Ct=5,$t=6,Yt=" ",Kt=le||ce||Pe?Yt:"",qt=`
|
|
59
|
-
|
|
60
|
-
`,fn=Se?Yt:Kt,dr="֑-߿יִ-﷽ﹰ-ﻼ",Cr="A-Za-zÀ-ÖØ-öø-ʸ̀-ࠀ-Ⰰ-︀--",Zo=new RegExp("^[^"+Cr+"]*["+dr+"]"),oa=new RegExp("^[^"+dr+"]*["+Cr+"]"),wr={bold:De,code:tt,highlight:Lt,italic:je,strikethrough:Me,subscript:ht,superscript:Et,underline:We},Zn={directionless:qe,unmergeable:lt},_r={center:ot,end:$t,justify:pt,left:et,right:ct,start:Ct},lo={[ot]:"center",[$t]:"end",[pt]:"justify",[et]:"left",[ct]:"right",[Ct]:"start"},ia={normal:Ae,segmented:_e,token:me},Ee={[Ae]:"normal",[_e]:"segmented",[me]:"token"},ae=100;let $e=!1,Be=0;function at(){return $e}function xt(g){Be=g.timeStamp}function _t(g){Be===0&&To(g).addEventListener("textInput",xt,!0)}function gt(g,c,h){return c.__lexicalLineBreak===g||g[`__lexicalKey_${h._key}`]!==void 0}function Ot(g){return g.getEditorState().read(()=>{const c=_n();return c!==null?c.clone():null})}function Wt(g,c,h){const E=Fr(h._window);let S=null,$=null;E!==null&&E.anchorNode===g&&(S=E.anchorOffset,$=E.focusOffset);const K=g.nodeValue;K!==null&&Ws(c,K,S,$,!1)}function Dt(g,c,h){if(wt(g)){const E=g.anchor.getNode();if(E.is(h)&&g.format!==E.getFormat())return!1}return c.nodeType===Qe&&h.isAttached()}function Gt(g,c,h){$e=!0;const E=performance.now()-Be>ae;try{Xr(g,()=>{const S=_n()||Ot(g),$=new Map,K=g.getRootElement(),G=g._editorState,be=g._blockCursorElement;let ye=!1,Te="";for(let Oe=0;Oe<c.length;Oe++){const Ne=c[Oe],ze=Ne.type,Le=Ne.target;let Je=Yr(Le,G);if(!(Je===null&&Le!==K||Wn(Je))){if(ze==="characterData")E&&Tt(Je)&&Dt(S,Le,Je)&&Wt(Le,Je,g);else if(ze==="childList"){ye=!0;const ft=Ne.addedNodes;for(let Bt=0;Bt<ft.length;Bt++){const Mt=ft[Bt],Vt=Fs(Mt),It=Mt.parentNode;if(It!=null&&Mt!==be&&Vt===null&&(Mt.nodeName!=="BR"||!gt(Mt,It,g))){if(Se){const Jt=Mt.innerText||Mt.nodeValue;Jt&&(Te+=Jt)}It.removeChild(Mt)}}const Ye=Ne.removedNodes,Pt=Ye.length;if(Pt>0){let Bt=0;for(let Mt=0;Mt<Pt;Mt++){const Vt=Ye[Mt];(Vt.nodeName==="BR"&>(Vt,Le,g)||be===Vt)&&(Le.appendChild(Vt),Bt++)}Pt!==Bt&&(Le===K&&(Je=Bs(G)),$.set(Le,Je))}}}}if($.size>0)for(const[Oe,Ne]of $)if(rt(Ne)){const ze=Ne.getChildrenKeys();let Le=Oe.firstChild;for(let Je=0;Je<ze.length;Je++){const ft=ze[Je],Ye=g.getElementByKey(ft);Ye!==null&&(Le==null?(Oe.appendChild(Ye),Le=Ye):Le!==Ye&&Oe.replaceChild(Ye,Le),Le=Le.nextSibling)}}else Tt(Ne)&&Ne.markDirty();const we=h.takeRecords();if(we.length>0){for(let Oe=0;Oe<we.length;Oe++){const Ne=we[Oe],ze=Ne.addedNodes,Le=Ne.target;for(let Je=0;Je<ze.length;Je++){const ft=ze[Je],Ye=ft.parentNode;Ye!=null&&ft.nodeName==="BR"&&!gt(ft,Le,g)&&Ye.removeChild(ft)}}h.takeRecords()}S!==null&&(ye&&(S.dirty=!0,pr(S)),Se&&Qo(g)&&S.insertRawText(Te))})}finally{$e=!1}}function mn(g){const c=g._observer;if(c!==null){const h=c.takeRecords();Gt(g,h,c)}}function xr(g){_t(g),g._observer=new MutationObserver((c,h)=>{Gt(g,c,h)})}function wn(g,c){const h=g.__mode,E=g.__format,S=g.__style,$=c.__mode,K=c.__format,G=c.__style;return(h===null||h===$)&&(E===null||E===K)&&(S===null||S===G)}function Jn(g,c){const h=g.mergeWithSibling(c),E=$n()._normalizedNodes;return E.add(g.__key),E.add(c.__key),h}function Mr(g){let c=g;if(c.__text===""&&c.isSimpleText()&&!c.isUnmergeable()){c.remove();return}let h;for(;(h=c.getPreviousSibling())!==null&&Tt(h)&&h.isSimpleText()&&!h.isUnmergeable();)if(h.__text==="")h.remove();else if(wn(h,c)){c=Jn(h,c);break}else break;let E;for(;(E=c.getNextSibling())!==null&&Tt(E)&&E.isSimpleText()&&!E.isUnmergeable();)if(E.__text==="")E.remove();else if(wn(c,E)){c=Jn(c,E);break}else break}function aa(g){return Jo(g.anchor),Jo(g.focus),g}function Jo(g){for(;g.type==="element";){const c=g.getNode(),h=g.offset;let E,S;if(h===c.getChildrenSize()?(E=c.getChildAtIndex(h-1),S=!0):(E=c.getChildAtIndex(h),S=!1),Tt(E)){g.set(E.__key,S?E.getTextContentSize():0,"text");break}else if(!rt(E))break;g.set(E.__key,S?E.getChildrenSize():0,"element")}}let mc=1;function vc(){return""+mc++}function yc(g,c){const h=g._nodes.get(c);if(h===void 0)throw Error(`registeredNode: Type ${c} not found`);return h}const co=typeof queueMicrotask=="function"?queueMicrotask:g=>{Promise.resolve().then(g)};function Is(g){return Wn(Yr(g))}function bc(g){const c=document.activeElement;if(c===null)return!1;const h=c.nodeName;return Wn(Yr(g))&&(h==="INPUT"||h==="TEXTAREA"||c.contentEditable==="true"&&c.__lexicalEditor==null)}function Xo(g,c,h){const E=g.getRootElement();try{return E!==null&&E.contains(c)&&E.contains(h)&&c!==null&&!bc(c)&&Ni(c)===g}catch{return!1}}function Ni(g){let c=g;for(;c!=null;){const h=c.__lexicalEditor;if(h!=null)return h;c=Gs(c)}return null}function _c(g){return Zo.test(g)?"rtl":oa.test(g)?"ltr":null}function Ls(g){return g.isToken()||g.isSegmented()}function ah(g){return g.nodeType===Qe}function An(g){let c=g;for(;c!=null;){if(ah(c))return c;c=c.firstChild}return null}function tr(g,c,h){const E=wr[c];if(h!==null&&(g&E)===(h&E))return g;let S=g^E;return c==="subscript"?S&=~wr.superscript:c==="superscript"&&(S&=~wr.subscript),S}function Eo(g){return Tt(g)||Ao(g)||Wn(g)}function Co(g,c){if(c!=null){g.__key=c;return}Or(),Ev();const h=$n(),E=ci(),S=vc();E._nodeMap.set(S,g),rt(g)?h._dirtyElements.set(S,!0):h._dirtyLeaves.add(S),h._cloneNotNeeded.add(S),h._dirtyType=dt,g.__key=S}function fr(g,c,h){let E=g;for(;E!==null;){if(h.has(E))return;const S=c.get(E);if(S===void 0)break;h.set(E,!1),E=S.__parent}}function Ur(g){const c=g.getParent();if(c!==null){const h=g.getWritable(),E=c.getWritable(),S=g.getPreviousSibling(),$=g.getNextSibling();if(S===null)if($!==null){const K=$.getWritable();E.__first=$.__key,K.__prev=null}else E.__first=null;else{const K=S.getWritable();if($!==null){const G=$.getWritable();G.__prev=K.__key,K.__next=G.__key}else K.__next=null;h.__prev=null}if($===null)if(S!==null){const K=S.getWritable();E.__last=S.__key,K.__next=null}else E.__last=null;else{const K=$.getWritable();if(S!==null){const G=S.getWritable();G.__next=K.__key,K.__prev=G.__key}else K.__prev=null;h.__next=null}E.__size--,h.__parent=null}}function Ga(g){Ev();const c=g.getLatest(),h=c.__parent,E=ci(),S=$n(),$=E._nodeMap,K=S._dirtyElements;h!==null&&fr(h,$,K);const G=c.__key;S._dirtyType=dt,rt(g)?K.set(G,!0):S._dirtyLeaves.add(G)}function xc(g){const c=g.getPreviousSibling(),h=g.getNextSibling();c!==null&&Ga(c),h!==null&&Ga(h)}function kn(g){Or();const c=$n(),h=c._compositionKey;if(g!==h){if(c._compositionKey=g,h!==null){const E=Fn(h);E!==null&&E.getWritable()}if(g!==null){const E=Fn(g);E!==null&&E.getWritable()}}}function Vr(){return ll()?null:$n()._compositionKey}function Fn(g,c){const h=(c||ci())._nodeMap.get(g);return h===void 0?null:h}function Fs(g,c){const h=$n(),E=g[`__lexicalKey_${h._key}`];return E!==void 0?Fn(E,c):null}function Yr(g,c){let h=g;for(;h!=null;){const E=Fs(h,c);if(E!==null)return E;h=Gs(h)}return null}function wo(g){const c=g._decorators,h=Object.assign({},c);return g._pendingDecorators=h,h}function js(g){return g.read(()=>hr().getTextContent())}function Ua(g,c){Xr(g,()=>{const h=ci();if(h.isEmpty())return;if(c==="root"){hr().markDirty();return}const E=h._nodeMap;for(const[,S]of E)S.markDirty()},g._pendingEditorState===null?{tag:"history-merge"}:void 0)}function hr(){return Bs(ci())}function Bs(g){return g._nodeMap.get("root")}function pr(g){Or();const c=ci();if(g!==null){if(Object.isFrozen(g))throw Error("$setSelection called on frozen selection object. Ensure selection is cloned before passing in.");g.dirty=!0,g.setCachedNodes(null)}c._selection=g}function Xu(){Or();const g=$n();mn(g)}function Ti(g){const c=$n(),h=Ec(g,c);if(h===null){const E=c.getRootElement();return g===E?Fn("root"):null}return Fn(h)}function Va(g,c){return c?g.getTextContentSize():0}function Ec(g,c){let h=g;for(;h!=null;){const E=h[`__lexicalKey_${c._key}`];if(E!==void 0)return E;h=Gs(h)}return null}function Cc(g){return/[\uD800-\uDBFF][\uDC00-\uDFFF]/g.test(g)}function Hs(g){const c=[];let h=g;for(;h!==null;)c.push(h),h=h._parentEditor;return c}function wc(){return Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,5)}function Ya(g){return g.nodeType===Qe?g.nodeValue:null}function Si(g,c,h){const E=Fr(c._window);if(E===null)return;const S=E.anchorNode;let{anchorOffset:$,focusOffset:K}=E;if(S!==null){let G=Ya(S);const be=Yr(S);if(G!==null&&Tt(be)){if(G===Kt&&h){const ye=h.length;G=h,$=ye,K=ye}G!==null&&Ws(be,G,$,K,g)}}}function Ws(g,c,h,E,S){let $=g;if($.isAttached()&&(S||!$.isDirty())){const K=$.isComposing();let G=c;(K||S)&&c[c.length-1]===Kt&&(G=c.slice(0,-1));const be=$.getTextContent();if(S||G!==be){if(G===""){if(kn(null),!le&&!ce&&!Pe){const Le=$n();setTimeout(()=>{Le.update(()=>{$.isAttached()&&$.remove()})},20)}else $.remove();return}const ye=$.getParent(),Te=sl(),we=$.getTextContentSize(),Oe=Vr(),Ne=$.getKey();if($.isToken()||Oe!==null&&Ne===Oe&&!K||wt(Te)&&(ye!==null&&!ye.canInsertTextBefore()&&Te.anchor.offset===0||Te.anchor.key===g.__key&&Te.anchor.offset===0&&!$.canInsertTextBefore()||Te.focus.key===g.__key&&Te.focus.offset===we&&!$.canInsertTextAfter())){$.markDirty();return}const ze=_n();if(!wt(ze)||h===null||E===null){$.setTextContent(G);return}if(ze.setTextNodeRange($,h,$,E),$.isSegmented()){const Le=$.getTextContent(),Je=Un(Le);$.replace(Je),$=Je}$.setTextContent(G)}}}function Nc(g){const c=g.getPreviousSibling();return(Tt(c)||rt(c)&&c.isInline())&&!c.canInsertTextAfter()}function Tc(g,c){if(c.isSegmented())return!0;if(!g.isCollapsed())return!1;const h=g.anchor.offset,E=c.getParentOrThrow(),S=c.isToken();return h===0?!c.canInsertTextBefore()||!E.canInsertTextBefore()||S||Nc(c):h===c.getTextContentSize()?!c.canInsertTextAfter()||!E.canInsertTextAfter()||S:!1}function No(g,c,h,E){return g===9&&!c&&!h&&!E}function Sc(g,c,h,E){return g===66&&!c&&Oi(h,E)}function qa(g,c,h,E){return g===73&&!c&&Oi(h,E)}function Qu(g,c,h,E){return g===85&&!c&&Oi(h,E)}function ed(g,c){return ca(g)&&!c}function sa(g,c){return ca(g)&&c}function Za(g,c){return Ce&&c&&g===79}function Oc(g,c,h){return Qa(g)&&(Ce?c:h)}function Ac(g,c,h){return es(g)&&(Ce?c:h)}function Ja(g,c){return Ce&&c&&Qa(g)}function Xa(g,c){return Ce&&c&&es(g)}function td(g,c,h,E){return Ce?c||h?!1:Qa(g)||g===72&&E:E||c||h?!1:Qa(g)}function nd(g,c,h,E,S){return Ce?h||E||S?!1:es(g)||g===68&&c:c||E||S?!1:es(g)}function rd(g,c,h,E){return g===90&&!c&&Oi(h,E)}function od(g,c,h,E){return Ce?g===90&&h&&c:g===89&&E||g===90&&E&&c}function sh(g,c,h,E){return c?!1:g===67?Ce?h:E:!1}function lh(g,c,h,E){return c?!1:g===88?Ce?h:E:!1}function Rc(g){return g===37}function id(g){return g===39}function ch(g){return g===38}function uh(g){return g===40}function dh(g,c,h,E){return Rc(g)&&!c&&!E&&!h}function $c(g,c,h,E,S){return Rc(g)&&!E&&!h&&(c||S)}function fh(g,c,h,E){return id(g)&&!c&&!E&&!h}function hh(g,c,h,E,S){return id(g)&&!E&&!h&&(c||S)}function ad(g,c,h){return ch(g)&&!c&&!h}function la(g,c,h){return uh(g)&&!c&&!h}function sd(g,c,h,E){return g||c||h||E}function ph(g){return g===32}function Oi(g,c){return Ce?g:c}function ca(g){return g===13}function Qa(g){return g===8}function ua(g){return g===27}function es(g){return g===46}function Ai(g,c,h){return g===65&&Oi(c,h)}function Ri(){const g=hr(),c=g.select(0,g.getChildrenSize());pr(aa(c))}function $i(g,c){g.__lexicalClassNameCache===void 0&&(g.__lexicalClassNameCache={});const h=g.__lexicalClassNameCache,E=h[c];if(E!==void 0)return E;const S=g[c];if(typeof S=="string"){const $=S.split(" ");return h[c]=$,$}return S}function ts(g,c,h,E,S){if(h.size===0)return;const $=E.__type,K=E.__key,G=c.get($);if(G===void 0)throw Error(`Type ${$} not in registeredNodes`);const be=G.klass;let ye=g.get(be);ye===void 0&&(ye=new Map,g.set(be,ye));const Te=ye.get(K),we=Te==="destroyed"&&S==="created";(Te===void 0||we)&&ye.set(K,we?"updated":S)}function Dc(g){const c=ci(),h=c._readOnly,E=g.getType(),S=c._nodeMap,$=[];for(const[,K]of S)K instanceof g&&K.__type===E&&(h||K.isAttached())&&$.push(K);return $}function zs(g,c,h){const E=g.getParent();let S=h,$=g;return E!==null&&(c&&h===0?(S=$.getIndexWithinParent(),$=E):!c&&h===$.getChildrenSize()&&(S=$.getIndexWithinParent()+1,$=E)),$.getChildAtIndex(c?S-1:S)}function da(g,c){const h=g.offset;if(g.type==="element"){const E=g.getNode();return zs(E,c,h)}else{const E=g.getNode();if(c&&h===0||!c&&h===E.getTextContentSize()){const S=c?E.getPreviousSibling():E.getNextSibling();return S===null?zs(E.getParentOrThrow(),c,E.getIndexWithinParent()+(c?0:1)):S}}return null}function Qo(g){const c=To(g).event,h=c&&c.inputType;return h==="insertFromPaste"||h==="insertFromPasteAsQuotation"}function yt(g,c,h){return Sv(g,c,h)}function Ks(g){return!Qr(g)&&!g.isLastChild()&&!g.isInline()}function ns(g,c){const h=g._keyToDOMMap.get(c);if(h===void 0)throw Error(`Reconciliation: could not find DOM element for node key ${c}`);return h}function Gs(g){const c=g.assignedSlot||g.parentElement;return c!==null&&c.nodeType===11?c.host:c}function gh(g,c,h){const E=h.ownerDocument,S=E.defaultView;if(S===null)return;let{top:$,bottom:K}=c,G=0,be=0,ye=h;for(;ye!==null;){const Te=ye===E.body;if(Te)G=0,be=To(g).innerHeight;else{const Oe=ye.getBoundingClientRect();G=Oe.top,be=Oe.bottom}let we=0;if($<G?we=-(G-$):K>be&&(we=K-be),we!==0)if(Te)S.scrollBy(0,we);else{const Oe=ye.scrollTop;ye.scrollTop+=we;const Ne=ye.scrollTop-Oe;$-=Ne,K-=Ne}if(Te)break;ye=Gs(ye)}}function ld(g){return $n()._updateTags.has(g)}function mh(g){Or(),$n()._updateTags.add(g)}function ei(g){const c=_n();if(!wt(c)||!rt(g))return c;const{anchor:h,focus:E}=c,S=h.getNode(),$=E.getNode();return jn(S,g)&&h.set(g.__key,0,"element"),jn($,g)&&E.set(g.__key,0,"element"),c}function jn(g,c){let h=g.getParent();for(;h!==null;){if(h.is(c))return!0;h=h.getParent()}return!1}function Nt(g){const c=g.ownerDocument;return c&&c.defaultView||null}function To(g){const c=g._window;if(c===null)throw Error("window object not found");return c}function Us(g){return rt(g)&&g.isInline()||Wn(g)&&g.isInline()}function Mc(g){let c=g.getParentOrThrow();for(;c!==null;){if(nr(c))return c;c=c.getParentOrThrow()}return c}function nr(g){return Qr(g)||rt(g)&&g.isShadowRoot()}function Vs(g){const c=g.constructor.clone(g);return Co(c,null),c}function fa(g){const c=$n(),h=g.constructor.getType(),E=c._nodes.get(h);if(E===void 0)throw Error('$initializeNode failed. Ensure node has been registered to the editor. You can do this by passing the node class via the "nodes" array in the editor config.');const S=E.replace;if(S!==null){const $=S(g);if(!($ instanceof g.constructor))throw Error("$initializeNode failed. Ensure replacement node is a subclass of the original node.");return $}return g}function Ys(g,c){const h=g.getParent();if(Qr(h)&&!rt(c)&&!Wn(c))throw Error("Only element or decorator nodes can be inserted in to the root node")}function ti(g){const c=g.theme,h=document.createElement("div");h.contentEditable="false",h.setAttribute("data-lexical-cursor","true");let E=c.blockCursor;if(E!==void 0){if(typeof E=="string"){const S=E.split(" ");E=c.blockCursor=S}E!==void 0&&h.classList.add(...E)}return h}function rs(g){return(Wn(g)||rt(g)&&!g.canBeEmpty())&&!g.isInline()}function ha(g,c,h){h.style.removeProperty("caret-color"),c._blockCursorElement=null;const E=g.parentElement;E!==null&&E.removeChild(g)}function kt(g,c,h){let E=g._blockCursorElement;if(wt(h)&&h.isCollapsed()&&h.anchor.type==="element"&&c.contains(document.activeElement)){const S=h.anchor,$=S.getNode(),K=S.offset,G=$.getChildrenSize();let be=!1,ye=null;if(K===G){const Te=$.getChildAtIndex(K-1);rs(Te)&&(be=!0)}else{const Te=$.getChildAtIndex(K);if(rs(Te)){const we=Te.getPreviousSibling();(we===null||rs(we))&&(be=!0,ye=g.getElementByKey(Te.__key))}}if(be){const Te=g.getElementByKey($.__key);E===null&&(g._blockCursorElement=E=ti(g._config)),c.style.caretColor="transparent",ye===null?Te.appendChild(E):Te.insertBefore(E,ye);return}}E!==null&&ha(E,g,c)}function Fr(g){return pe?(g||window).getSelection():null}function kc(g,c){let h=g.getChildAtIndex(c);if(h==null&&(h=g),nr(g))throw Error("Can not call $splitNode() on root element");const E=K=>{const G=K.getParentOrThrow(),be=nr(G),ye=K===h&&!be?K:Vs(K);if(be)return K.insertAfter(ye),[K,ye,ye];{const[Te,we,Oe]=E(G),Ne=K.getNextSiblings();return Oe.append(ye,...Ne),[Te,we,ye]}},[S,$]=E(h);return[S,$]}function Di(g,c){let h=g;for(;h!==hr()&&h!=null;){if(c(h))return h;h=h.getParent()}return null}function cd(g){const c=[],h=[g];for(;h.length>0;){const E=h.pop();if(E===void 0)throw Error("Stack.length > 0; can't be undefined");rt(E)&&h.unshift(...E.getChildren()),E!==g&&c.push(E)}return c}function Mi(g){return ni(g)&&g.tagName==="A"}function ni(g){return g.nodeType===1}function pa(g){if(Wn(g)&&!g.isInline())return!0;if(!rt(g)||nr(g))return!1;const c=g.getFirstChild(),h=c===null||Ao(c)||Tt(c)||c.isInline();return!g.isInline()&&g.canBeEmpty()!==!1&&h}function os(g,c){let h=g;for(;h!==null&&h.getParent()!==null&&!c(h);)h=h.getParentOrThrow();return c(h)?h:null}function ud(g,c){const h=g._decorators;let E=g._pendingDecorators||h;const S=c._nodeMap;let $;for($ in E)S.has($)||(E===h&&(E=wo(g)),delete E[$])}function Pc(g,c,h,E,S,$){let K=g.getFirstChild();for(;K!==null;){const G=K.__key;K.__parent===c&&(rt(K)&&Pc(K,G,h,E,S,$),h.has(G)||$.delete(G),S.push(G)),K=K.getNextSibling()}}function dd(g,c,h,E){const S=g._nodeMap,$=c._nodeMap,K=[];for(const[G]of E){const be=$.get(G);be!==void 0&&(be.isAttached()||(rt(be)&&Pc(be,G,S,$,K,E),S.has(G)||E.delete(G),K.push(G)))}for(const G of K)$.delete(G);for(const G of h){const be=$.get(G);be!==void 0&&!be.isAttached()&&(S.has(G)||h.delete(G),$.delete(G))}}let Bn="",gr="",uo="",fo,Er,ki,hn=!1,ri=!1,Pi,is=null,Ic,ga,oi,So,qs,Ii;function Zs(g,c){const h=oi.get(g);if(c!==null){const E=Qs(g);E.parentNode===c&&c.removeChild(E)}if(So.has(g)||Er._keyToDOMMap.delete(g),rt(h)){const E=Xs(h,oi);Hn(E,0,E.length-1,null)}h!==void 0&&ts(Ii,ki,Pi,h,"destroyed")}function Hn(g,c,h,E){let S=c;for(;S<=h;++S){const $=g[S];$!==void 0&&Zs($,E)}}function yn(g,c){g.setProperty("text-align",c)}const Nr="40px";function Js(g,c){const h=fo.theme.indent;if(typeof h=="string"){const S=g.classList.contains(h);c>0&&!S?g.classList.add(h):c<1&&S&&g.classList.remove(h)}const E=getComputedStyle(g).getPropertyValue("--lexical-indent-base-value")||Nr;g.style.setProperty("padding-inline-start",c===0?"":`calc(${c} * ${E})`)}function ma(g,c){const h=g.style;c===0?yn(h,""):c===et?yn(h,"left"):c===ot?yn(h,"center"):c===ct?yn(h,"right"):c===pt?yn(h,"justify"):c===Ct?yn(h,"start"):c===$t&&yn(h,"end")}function as(g,c,h){const E=So.get(g);if(E===void 0)throw Error("createNode: node does not exist in nodeMap");const S=E.createDOM(fo,Er);if(kr(g,S,Er),Tt(E)?S.setAttribute("data-lexical-text","true"):Wn(E)&&S.setAttribute("data-lexical-decorator","true"),rt(E)){const $=E.__indent,K=E.__size;if($!==0&&Js(S,$),K!==0){const be=K-1,ye=Xs(E,So);va(ye,be,E,S)}const G=E.__format;G!==0&&ma(S,G),E.isInline()||bn(null,E,S),Ks(E)&&(Bn+=qt,uo+=qt)}else{const $=E.getTextContent();if(Wn(E)){const K=E.decorate(Er,fo);K!==null&&ii(g,K),S.contentEditable="false"}else Tt(E)&&(E.isDirectionless()||(gr+=$));Bn+=$,uo+=$}if(c!==null)if(h!=null)c.insertBefore(S,h);else{const $=c.__lexicalLineBreak;$!=null?c.insertBefore(S,$):c.appendChild(S)}return Object.freeze(E),ts(Ii,ki,Pi,E,"created"),S}function va(g,c,h,E){const S=gr;gr="",rr(g,h,0,c,E,null),Lc(h,E),gr=S}function rr(g,c,h,E,S,$){const K=Bn;Bn="";let G=h;for(;G<=E;++G)as(g[G],S,$);Ks(c)&&(Bn+=qt),S.__lexicalTextContent=Bn,Bn=K+Bn}function qr(g,c){const h=c.get(g);return Ao(h)||Wn(h)&&h.isInline()}function bn(g,c,h){const E=g!==null&&(g.__size===0||qr(g.__last,oi)),S=c.__size===0||qr(c.__last,So);if(E){if(!S){const $=h.__lexicalLineBreak;$!=null&&h.removeChild($),h.__lexicalLineBreak=null}}else if(S){const $=document.createElement("br");h.__lexicalLineBreak=$,h.appendChild($)}}function Lc(g,c){const h=c.__lexicalDirTextContent,E=c.__lexicalDir;if(h!==gr||E!==is){const S=gr==="",$=S?is:_c(gr);if($!==E){const K=c.classList,G=fo.theme;let be=E!==null?G[E]:void 0,ye=$!==null?G[$]:void 0;if(be!==void 0){if(typeof be=="string"){const Te=be.split(" ");be=G[E]=Te}K.remove(...be)}if($===null||S&&$==="ltr")c.removeAttribute("dir");else{if(ye!==void 0){if(typeof ye=="string"){const Te=ye.split(" ");ye=G[$]=Te}ye!==void 0&&K.add(...ye)}c.dir=$}if(!ri){const Te=g.getWritable();Te.__dir=$}}is=$,c.__lexicalDirTextContent=gr,c.__lexicalDir=$}}function vh(g,c,h){const E=gr;gr="",Fc(g,c,h),Lc(c,h),gr=E}function Xs(g,c){const h=[];let E=g.__first;for(;E!==null;){const S=c.get(E);if(S===void 0)throw Error("createChildrenArray: node does not exist in nodeMap");h.push(E),E=S.__next}return h}function Fc(g,c,h){const E=Bn,S=g.__size,$=c.__size;if(Bn="",S===1&&$===1){const K=g.__first,G=c.__first;if(K===G)ya(K,h);else{const be=Qs(K),ye=as(G,null,null);h.replaceChild(ye,be),Zs(K,null)}}else{const K=Xs(g,oi),G=Xs(c,So);if(S===0)$!==0&&rr(G,c,0,$-1,h,null);else if($===0){if(S!==0){const be=h.__lexicalLineBreak==null;Hn(K,0,S-1,be?null:h),be&&(h.textContent="")}}else fd(c,K,G,S,$,h)}Ks(c)&&(Bn+=qt),h.__lexicalTextContent=Bn,Bn=E+Bn}function ya(g,c){const h=oi.get(g);let E=So.get(g);if(h===void 0||E===void 0)throw Error("reconcileNode: prevNode or nextNode does not exist in nodeMap");const S=hn||ga.has(g)||Ic.has(g),$=ns(Er,g);if(h===E&&!S){if(rt(h)){const K=$.__lexicalTextContent;K!==void 0&&(Bn+=K,uo+=K);const G=$.__lexicalDirTextContent;G!==void 0&&(gr+=G)}else{const K=h.getTextContent();Tt(h)&&!h.isDirectionless()&&(gr+=K),uo+=K,Bn+=K}return $}if(h!==E&&S&&ts(Ii,ki,Pi,E,"updated"),E.updateDOM(h,$,fo)){const K=as(g,null,null);if(c===null)throw Error("reconcileNode: parentDOM is null");return c.replaceChild(K,$),Zs(g,null),K}if(rt(h)&&rt(E)){const K=E.__indent;K!==h.__indent&&Js($,K);const G=E.__format;G!==h.__format&&ma($,G),S&&(vh(h,E,$),!Qr(E)&&!E.isInline()&&bn(h,E,$)),Ks(E)&&(Bn+=qt,uo+=qt)}else{const K=E.getTextContent();if(Wn(E)){const G=E.decorate(Er,fo);G!==null&&ii(g,G)}else Tt(E)&&!E.isDirectionless()&&(gr+=K);Bn+=K,uo+=K}return!ri&&Qr(E)&&E.__cachedText!==uo&&(E=E.getWritable(),E.__cachedText=uo),Object.freeze(E),$}function ii(g,c){let h=Er._pendingDecorators;const E=Er._decorators;if(h===null){if(E[g]===c)return;h=wo(Er)}h[g]=c}function ss(g){return g.firstChild}function mt(g){let c=g.nextSibling;return c!==null&&c===Er._blockCursorElement&&(c=c.nextSibling),c}function fd(g,c,h,E,S,$){const K=E-1,G=S-1;let be,ye,Te=ss($),we=0,Oe=0;for(;we<=K&&Oe<=G;){const Le=c[we],Je=h[Oe];if(Le===Je)Te=mt(ya(Je,$)),we++,Oe++;else{be===void 0&&(be=new Set(c)),ye===void 0&&(ye=new Set(h));const ft=ye.has(Le),Ye=be.has(Je);if(!ft)Te=mt(Qs(Le)),Zs(Le,$),we++;else if(!Ye)as(Je,$,Te),Oe++;else{const Pt=ns(Er,Je);Pt===Te?Te=mt(ya(Je,$)):(Te!=null?$.insertBefore(Pt,Te):$.appendChild(Pt),ya(Je,$)),we++,Oe++}}}const Ne=we>K,ze=Oe>G;if(Ne&&!ze){const Le=h[G+1],Je=Le===void 0?null:Er.getElementByKey(Le);rr(h,g,Oe,G,$,Je)}else ze&&!Ne&&Hn(c,we,K,$)}function hd(g,c,h,E,S,$){Bn="",uo="",gr="",hn=E===At,is=null,Er=h,fo=h._config,ki=h._nodes,Pi=Er._listeners.mutation,Ic=S,ga=$,oi=g._nodeMap,So=c._nodeMap,ri=c._readOnly,qs=new Map(h._keyToDOMMap);const K=new Map;return Ii=K,ya("root",null),Er=void 0,ki=void 0,Ic=void 0,ga=void 0,oi=void 0,So=void 0,fo=void 0,qs=void 0,Ii=void 0,K}function kr(g,c,h){const E=h._keyToDOMMap;c["__lexicalKey_"+h._key]=g,E.set(g,c)}function Qs(g){const c=qs.get(g);if(c===void 0)throw Error(`Reconciliation: could not find DOM element for node key ${g}`);return c}const on=Object.freeze({}),Oo=30,nt=[["keydown",A],["pointerdown",jr],["compositionstart",s],["compositionend",x],["input",f],["click",Bc],["cut",on],["copy",on],["dragstart",on],["dragover",on],["dragend",on],["paste",on],["focus",on],["blur",on],["drop",on]];He&&nt.push(["beforeinput",(g,c)=>cs(g,c)]);let ba=0,Li=0,Tr=0,_a=null,Fi=0,el=!1,xa=!1,ho=!1,ls=!1,po=[0,"",0,"root",0];function jc(g,c,h,E,S){const $=g.anchor,K=g.focus,G=$.getNode(),be=$n(),ye=Fr(be._window),Te=ye!==null?ye.anchorNode:null,we=$.key,Oe=be.getElementByKey(we),Ne=h.length;return we!==K.key||!Tt(G)||(!S&&(!He||Tr<E+50)||G.isDirty()&&Ne<2||Cc(h))&&$.offset!==K.offset&&!G.isComposing()||Ls(G)||G.isDirty()&&Ne>1||(S||!He)&&Oe!==null&&!G.isComposing()&&Te!==An(Oe)||ye!==null&&c!==null&&(!c.collapsed||c.startContainer!==ye.anchorNode||c.startOffset!==ye.anchorOffset)||G.getFormat()!==g.format||G.getStyle()!==g.style||Tc(g,G)}function pd(g,c){return g!==null&&g.nodeValue!==null&&g.nodeType===Qe&&c!==0&&c!==g.nodeValue.length}function gd(g,c,h){const{anchorNode:E,anchorOffset:S,focusNode:$,focusOffset:K}=g;el&&(el=!1,pd(E,S)&&pd($,K))||Xr(c,()=>{if(!h){pr(null);return}if(!Xo(c,E,$))return;const G=_n();if(wt(G)){const be=G.anchor,ye=be.getNode();if(G.isCollapsed()){g.type==="Range"&&g.anchorNode===g.focusNode&&(G.dirty=!0);const Te=To(c).event,we=Te?Te.timeStamp:performance.now(),[Oe,Ne,ze,Le,Je]=po,ft=hr(),Ye=c.isComposing()===!1&&ft.getTextContent()==="";we<Je+200&&be.offset===ze&&be.key===Le?(G.format=Oe,G.style=Ne):be.type==="text"?(G.format=ye.getFormat(),G.style=ye.getStyle()):be.type==="element"&&!Ye&&(G.format=0,G.style="")}else{let Te=Xe,we=!1;const Oe=G.getNodes(),Ne=Oe.length;for(let ze=0;ze<Ne;ze++){const Le=Oe[ze];if(Tt(Le)&&(we=!0,Te&=Le.getFormat(),Te===0))break}G.format=we?Te:0}}yt(c,t,void 0)})}function Bc(g,c){Xr(c,()=>{const h=_n(),E=Fr(c._window),S=sl();if(E){if(wt(h)){const $=h.anchor,K=$.getNode();if($.type==="element"&&$.offset===0&&h.isCollapsed()&&!Qr(K)&&hr().getChildrenSize()===1&&K.getTopLevelElementOrThrow().isEmpty()&&S!==null&&h.is(S))E.removeAllRanges(),h.dirty=!0;else if(g.detail===3&&!h.isCollapsed()){const G=h.focus.getNode();K!==G&&(rt(K)?K.select(0):K.getParentOrThrow().select(0))}}else if(g.pointerType==="touch"){const $=E.anchorNode;if($!==null){const K=$.nodeType;if(K===Fe||K===Qe){const G=_h(S,E,c);pr(G)}}}}yt(c,n,g)})}function jr(g,c){const h=g.target,E=g.pointerType;h instanceof Node&&E!=="touch"&&Xr(c,()=>{Is(h)||(xa=!0)})}function Hc(g){if(!g.getTargetRanges)return null;const c=g.getTargetRanges();return c.length===0?null:c[0]}function Wc(g,c){return g!==c||rt(g)||rt(c)||!g.isToken()||!c.isToken()}function md(g){return Li===229&&g<ba+Oo}function cs(g,c){const h=g.inputType,E=Hc(g);h==="deleteCompositionText"||Se&&Qo(c)||h!=="insertCompositionText"&&Xr(c,()=>{const S=_n();if(h==="deleteContentBackward"){if(S===null){const Te=sl();if(!wt(Te))return;pr(Te.clone())}if(wt(S)){if(ve&&kn(S.anchor.key),md(g.timeStamp)&&c.isComposing()&&S.anchor.key===S.focus.key){if(kn(null),ba=0,setTimeout(()=>{Xr(c,()=>{kn(null)})},Oo),wt(S)){const Te=S.anchor.getNode();Te.markDirty(),S.format=Te.getFormat(),S.style=Te.getStyle()}S.anchor.getNode().getTextContent().length<=1&&(g.preventDefault(),yt(c,r,!0))}else g.preventDefault(),yt(c,r,!0);return}}if(!wt(S))return;const $=g.data;_a!==null&&Si(!1,c,_a),(!S.dirty||_a!==null)&&S.isCollapsed()&&!Qr(S.anchor.getNode())&&E!==null&&S.applyDOMRange(E),_a=null;const K=S.anchor,G=S.focus,be=K.getNode(),ye=G.getNode();if(h==="insertText"||h==="insertTranspose"){if($===`
|
|
61
|
-
`)g.preventDefault(),yt(c,o,!1);else if($===qt)g.preventDefault(),yt(c,i,void 0);else if($==null&&g.dataTransfer){const Te=g.dataTransfer.getData("text/plain");g.preventDefault(),S.insertRawText(Te)}else $!=null&&jc(S,E,$,g.timeStamp,!0)?(g.preventDefault(),yt(c,a,$)):_a=$;Tr=g.timeStamp;return}switch(g.preventDefault(),h){case"insertFromYank":case"insertFromDrop":case"insertReplacementText":{yt(c,a,g);break}case"insertFromComposition":{kn(null),yt(c,a,g);break}case"insertLineBreak":{kn(null),yt(c,o,!1);break}case"insertParagraph":{kn(null),ho&&!ce?(ho=!1,yt(c,o,!1)):yt(c,i,void 0);break}case"insertFromPaste":case"insertFromPasteAsQuotation":{yt(c,l,g);break}case"deleteByComposition":{Wc(be,ye)&&yt(c,u,g);break}case"deleteByDrag":case"deleteByCut":{yt(c,u,g);break}case"deleteContent":{yt(c,r,!1);break}case"deleteWordBackward":{yt(c,p,!0);break}case"deleteWordForward":{yt(c,p,!1);break}case"deleteHardLineBackward":case"deleteSoftLineBackward":{yt(c,m,!0);break}case"deleteContentForward":case"deleteHardLineForward":case"deleteSoftLineForward":{yt(c,m,!1);break}case"formatStrikeThrough":{yt(c,_,"strikethrough");break}case"formatBold":{yt(c,_,"bold");break}case"formatItalic":{yt(c,_,"italic");break}case"formatUnderline":{yt(c,_,"underline");break}case"historyUndo":{yt(c,v,void 0);break}case"historyRedo":{yt(c,C,void 0);break}}})}function f(g,c){g.stopPropagation(),Xr(c,()=>{const h=_n(),E=g.data,S=Hc(g);if(E!=null&&wt(h)&&jc(h,S,E,g.timeStamp,!1)){ls&&(d(c,E),ls=!1);const $=h.anchor,K=$.getNode(),G=Fr(c._window);if(G===null)return;const be=$.offset;(!He||h.isCollapsed()||!Tt(K)||G.anchorNode===null||K.getTextContent().slice(0,be)+E+K.getTextContent().slice(be+h.focus.offset)!==Ya(G.anchorNode))&&yt(c,a,E);const ye=E.length;Se&&ye>1&&g.inputType==="insertCompositionText"&&!c.isComposing()&&(h.anchor.offset-=ye),!le&&!ce&&!Pe&&c.isComposing()&&(ba=0,kn(null))}else Si(!1,c,E!==null?E:void 0),ls&&(d(c,E||void 0),ls=!1);Xu()}),_a=null}function s(g,c){Xr(c,()=>{const h=_n();if(wt(h)&&!c.isComposing()){const E=h.anchor,S=h.anchor.getNode();kn(E.key),(g.timeStamp<ba+Oo||E.type==="element"||!h.isCollapsed()||S.getFormat()!==h.format||S.getStyle()!==h.style)&&yt(c,a,fn)}})}function d(g,c){const h=g._compositionKey;if(kn(null),h!==null&&c!=null){if(c===""){const E=Fn(h),S=An(g.getElementByKey(h));S!==null&&S.nodeValue!==null&&Tt(E)&&Ws(E,S.nodeValue,null,null,!0);return}if(c[c.length-1]===`
|
|
62
|
-
`){const E=_n();if(wt(E)){const S=E.focus;E.anchor.set(S.key,S.offset,S.type),yt(g,M,null);return}}}Si(!0,g,c)}function x(g,c){Se?ls=!0:Xr(c,()=>{d(c,g.data)})}function A(g,c){if(ba=g.timeStamp,Li=g.keyCode,c.isComposing())return;const{keyCode:h,shiftKey:E,ctrlKey:S,metaKey:$,altKey:K}=g;if(!yt(c,b,g)){if(fh(h,S,K,$))yt(c,y,g);else if(hh(h,S,E,K,$))yt(c,N,g);else if(dh(h,S,K,$))yt(c,R,g);else if($c(h,S,E,K,$))yt(c,O,g);else if(ad(h,S,$))yt(c,k,g);else if(la(h,S,$))yt(c,I,g);else if(sa(h,E))ho=!0,yt(c,M,g);else if(ph(h))yt(c,Y,g);else if(Za(h,S))g.preventDefault(),ho=!0,yt(c,o,!0);else if(ed(h,E))ho=!1,yt(c,M,g);else if(td(h,K,$,S))Qa(h)?yt(c,ee,g):(g.preventDefault(),yt(c,r,!0));else if(ua(h))yt(c,re,g);else if(nd(h,S,E,K,$))es(h)?yt(c,Z,g):(g.preventDefault(),yt(c,r,!1));else if(Oc(h,K,S))g.preventDefault(),yt(c,p,!0);else if(Ac(h,K,S))g.preventDefault(),yt(c,p,!1);else if(Ja(h,$))g.preventDefault(),yt(c,m,!0);else if(Xa(h,$))g.preventDefault(),yt(c,m,!1);else if(Sc(h,K,$,S))g.preventDefault(),yt(c,_,"bold");else if(Qu(h,K,$,S))g.preventDefault(),yt(c,_,"underline");else if(qa(h,K,$,S))g.preventDefault(),yt(c,_,"italic");else if(No(h,K,S,$))yt(c,U,g);else if(rd(h,E,$,S))g.preventDefault(),yt(c,v,void 0);else if(od(h,E,$,S))g.preventDefault(),yt(c,C,void 0);else{const G=c._editorState._selection;mr(G)?sh(h,E,$,S)?(g.preventDefault(),yt(c,ie,g)):lh(h,E,$,S)?(g.preventDefault(),yt(c,H,g)):Ai(h,$,S)&&(g.preventDefault(),yt(c,j,g)):!Se&&Ai(h,$,S)&&(g.preventDefault(),yt(c,j,g))}sd(S,E,K,$)&&yt(c,ue,g)}}function D(g){let c=g.__lexicalEventHandles;return c===void 0&&(c=[],g.__lexicalEventHandles=c),c}const W=new Map;function oe(g){const c=g.target,h=c==null?null:c.nodeType===9?c.defaultView:c.ownerDocument.defaultView,E=Fr(h);if(E===null)return;const S=Ni(E.anchorNode);if(S===null)return;xa&&(xa=!1,Xr(S,()=>{const Te=sl(),we=E.anchorNode;if(we===null)return;const Oe=we.nodeType;if(Oe!==Fe&&Oe!==Qe)return;const Ne=_h(Te,E,S);pr(Ne)}));const $=Hs(S),K=$[$.length-1],G=K._key,be=W.get(G),ye=be||K;ye!==S&&gd(E,ye,!1),gd(E,S,!0),S!==K?W.set(G,S):be&&W.delete(G)}function xe(g){g._lexicalHandled=!0}function Re(g){return g._lexicalHandled===!0}function Ve(g,c){Fi===0&&g.ownerDocument.addEventListener("selectionchange",oe),Fi++,g.__lexicalEditor=c;const h=D(g);for(let E=0;E<nt.length;E++){const[S,$]=nt[E],K=typeof $=="function"?G=>{Re(G)||(xe(G),c.isEditable()&&$(G,c))}:G=>{if(!Re(G)&&(xe(G),c.isEditable()))switch(S){case"cut":return yt(c,H,G);case"copy":return yt(c,ie,G);case"paste":return yt(c,l,G);case"dragstart":return yt(c,V,G);case"dragover":return yt(c,B,G);case"dragend":return yt(c,q,G);case"focus":return yt(c,P,G);case"blur":return yt(c,X,G);case"drop":return yt(c,te,G)}};g.addEventListener(S,K),h.push(()=>{g.removeEventListener(S,K)})}}function Ze(g){Fi!==0&&(Fi--,Fi===0&&g.ownerDocument.removeEventListener("selectionchange",oe));const c=g.__lexicalEditor;c!=null&&(Ke(c),g.__lexicalEditor=null);const h=D(g);for(let E=0;E<h.length;E++)h[E]();g.__lexicalEventHandles=[]}function Ke(g){if(g._parentEditor!==null){const c=Hs(g),h=c[c.length-1]._key;W.get(h)===g&&W.delete(h)}else W.delete(g._key)}function Ie(){el=!0}function it(g,c,h,E,S){po=[g,c,h,E,S]}function bt(g,c,h){Or();const E=g.__key,S=g.getParent();if(S===null)return;const $=ei(g);let K=!1;if(wt($)&&c){const G=$.anchor,be=$.focus;G.key===E&&(Ed(G,g,S,g.getPreviousSibling(),g.getNextSibling()),K=!0),be.key===E&&(Ed(be,g,S,g.getPreviousSibling(),g.getNextSibling()),K=!0)}else mr($)&&c&&g.isSelected()&&g.selectPrevious();if(wt($)&&c&&!K){const G=g.getIndexWithinParent();Ur(g),xd($,S,G,-1)}else Ur(g);!h&&!nr(S)&&!S.canBeEmpty()&&S.isEmpty()&&bt(S,c),c&&Qr(S)&&S.isEmpty()&&S.selectEnd()}class Rt{static getType(){throw Error(`LexicalNode: Node ${this.name} does not implement .getType().`)}static clone(c){throw Error(`LexicalNode: Node ${this.name} does not implement .clone().`)}constructor(c){this.__type=this.constructor.getType(),this.__parent=null,this.__prev=null,this.__next=null,Co(this,c),this.__type!=="root"&&(Or(),zt(this.__type,this.constructor))}getType(){return this.__type}isAttached(){let c=this.__key;for(;c!==null;){if(c==="root")return!0;const h=Fn(c);if(h===null)break;c=h.__parent}return!1}isSelected(c){const h=c||_n();if(h==null)return!1;const E=h.getNodes().some(S=>S.__key===this.__key);return Tt(this)?E:wt(h)&&h.anchor.type==="element"&&h.focus.type==="element"&&h.anchor.key===h.focus.key&&h.anchor.offset===h.focus.offset?!1:E}getKey(){return this.__key}getIndexWithinParent(){const c=this.getParent();if(c===null)return-1;let h=c.getFirstChild(),E=0;for(;h!==null;){if(this.is(h))return E;E++,h=h.getNextSibling()}return-1}getParent(){const c=this.getLatest().__parent;return c===null?null:Fn(c)}getParentOrThrow(){const c=this.getParent();if(c===null)throw Error(`Expected node ${this.__key} to have a parent.`);return c}getTopLevelElement(){let c=this;for(;c!==null;){const h=c.getParent();if(nr(h))return c;c=h}return null}getTopLevelElementOrThrow(){const c=this.getTopLevelElement();if(c===null)throw Error(`Expected node ${this.__key} to have a top parent element.`);return c}getParents(){const c=[];let h=this.getParent();for(;h!==null;)c.push(h),h=h.getParent();return c}getParentKeys(){const c=[];let h=this.getParent();for(;h!==null;)c.push(h.__key),h=h.getParent();return c}getPreviousSibling(){const c=this.getLatest().__prev;return c===null?null:Fn(c)}getPreviousSiblings(){const c=[],h=this.getParent();if(h===null)return c;let E=h.getFirstChild();for(;E!==null&&!E.is(this);)c.push(E),E=E.getNextSibling();return c}getNextSibling(){const c=this.getLatest().__next;return c===null?null:Fn(c)}getNextSiblings(){const c=[];let h=this.getNextSibling();for(;h!==null;)c.push(h),h=h.getNextSibling();return c}getCommonAncestor(c){const h=this.getParents(),E=c.getParents();rt(this)&&h.unshift(this),rt(c)&&E.unshift(c);const S=h.length,$=E.length;if(S===0||$===0||h[S-1]!==E[$-1])return null;const K=new Set(E);for(let G=0;G<S;G++){const be=h[G];if(K.has(be))return be}return null}is(c){return c==null?!1:this.__key===c.__key}isBefore(c){if(this===c)return!1;if(c.isParentOf(this))return!0;if(this.isParentOf(c))return!1;const h=this.getCommonAncestor(c);let E=0,S=0,$=this;for(;;){const K=$.getParentOrThrow();if(K===h){E=$.getIndexWithinParent();break}$=K}for($=c;;){const K=$.getParentOrThrow();if(K===h){S=$.getIndexWithinParent();break}$=K}return E<S}isParentOf(c){const h=this.__key;if(h===c.__key)return!1;let E=c;for(;E!==null;){if(E.__key===h)return!0;E=E.getParent()}return!1}getNodesBetween(c){const h=this.isBefore(c),E=[],S=new Set;let $=this;for(;;){const K=$.__key;if(S.has(K)||(S.add(K),E.push($)),$===c)break;const G=rt($)?h?$.getFirstChild():$.getLastChild():null;if(G!==null){$=G;continue}const be=h?$.getNextSibling():$.getPreviousSibling();if(be!==null){$=be;continue}const ye=$.getParentOrThrow();if(S.has(ye.__key)||E.push(ye),ye===c)break;let Te=null,we=ye;do{if(we===null)throw Error("getNodesBetween: ancestor is null");Te=h?we.getNextSibling():we.getPreviousSibling(),we=we.getParent(),we!==null&&Te===null&&!S.has(we.__key)&&E.push(we)}while(Te===null);$=Te}return h||E.reverse(),E}isDirty(){const c=$n()._dirtyLeaves;return c!==null&&c.has(this.__key)}getLatest(){const c=Fn(this.__key);if(c===null)throw Error("Lexical node does not exist in active editor state. Avoid using the same node references between nested closures from editorState.read/editor.update.");return c}getWritable(){Or();const c=ci(),h=$n(),E=c._nodeMap,S=this.__key,$=this.getLatest(),K=$.__parent,G=h._cloneNotNeeded,be=_n();if(ir(be)&&be.setCachedNodes(null),G.has(S))return Ga($),$;const ye=$.constructor.clone($);return ye.__parent=K,ye.__next=$.__next,ye.__prev=$.__prev,rt($)&&rt(ye)?(ye.__first=$.__first,ye.__last=$.__last,ye.__size=$.__size,ye.__indent=$.__indent,ye.__format=$.__format,ye.__dir=$.__dir):Tt($)&&Tt(ye)&&(ye.__format=$.__format,ye.__style=$.__style,ye.__mode=$.__mode,ye.__detail=$.__detail),G.add(S),ye.__key=S,Ga(ye),E.set(S,ye),ye}getTextContent(){return""}getTextContentSize(){return this.getTextContent().length}createDOM(c,h){throw Error("createDOM: base method not extended")}updateDOM(c,h,E){throw Error("updateDOM: base method not extended")}exportDOM(c){return{element:this.createDOM(c._config,c)}}exportJSON(){throw Error("exportJSON: base method not extended")}static importJSON(c){throw Error(`LexicalNode: Node ${this.name} does not implement .importJSON().`)}static transform(){return null}remove(c){bt(this,!0,c)}replace(c,h){Or();let E=_n();E!==null&&(E=E.clone()),Ys(this,c);const S=this.getLatest(),$=this.__key,K=c.__key,G=c.getWritable(),be=this.getParentOrThrow().getWritable(),ye=be.__size;Ur(G);const Te=S.getPreviousSibling(),we=S.getNextSibling(),Oe=S.__prev,Ne=S.__next,ze=S.__parent;if(bt(S,!1,!0),Te===null)be.__first=K;else{const Le=Te.getWritable();Le.__next=K}if(G.__prev=Oe,we===null)be.__last=K;else{const Le=we.getWritable();Le.__prev=K}if(G.__next=Ne,G.__parent=ze,be.__size=ye,h&&this.getChildren().forEach(Le=>{G.append(Le)}),wt(E)){pr(E);const Le=E.anchor,Je=E.focus;Le.key===$&&ol(Le,G),Je.key===$&&ol(Je,G)}return Vr()===$&&kn(K),G}insertAfter(c,h=!0){Or(),Ys(this,c);const E=this.getWritable(),S=c.getWritable(),$=S.getParent(),K=_n();let G=!1,be=!1;if($!==null){const Ne=c.getIndexWithinParent();if(Ur(S),wt(K)){const ze=$.__key,Le=K.anchor,Je=K.focus;G=Le.type==="element"&&Le.key===ze&&Le.offset===Ne+1,be=Je.type==="element"&&Je.key===ze&&Je.offset===Ne+1}}const ye=this.getNextSibling(),Te=this.getParentOrThrow().getWritable(),we=S.__key,Oe=E.__next;if(ye===null)Te.__last=we;else{const Ne=ye.getWritable();Ne.__prev=we}if(Te.__size++,E.__next=we,S.__next=Oe,S.__prev=E.__key,S.__parent=E.__parent,h&&wt(K)){const Ne=this.getIndexWithinParent();xd(K,Te,Ne+1);const ze=Te.__key;G&&K.anchor.set(ze,Ne+2,"element"),be&&K.focus.set(ze,Ne+2,"element")}return c}insertBefore(c,h=!0){Or(),Ys(this,c);const E=this.getWritable(),S=c.getWritable(),$=S.__key;Ur(S);const K=this.getPreviousSibling(),G=this.getParentOrThrow().getWritable(),be=E.__prev,ye=this.getIndexWithinParent();if(K===null)G.__first=$;else{const we=K.getWritable();we.__next=$}G.__size++,E.__prev=$,S.__prev=be,S.__next=E.__key,S.__parent=E.__parent;const Te=_n();if(h&&wt(Te)){const we=this.getParentOrThrow();xd(Te,we,ye)}return c}isParentRequired(){return!1}createParentElementNode(){return Bi()}selectStart(){return this.selectPrevious()}selectEnd(){return this.selectNext(0,0)}selectPrevious(c,h){Or();const E=this.getPreviousSibling(),S=this.getParentOrThrow();if(E===null)return S.select(0,0);if(rt(E))return E.select();if(!Tt(E)){const $=E.getIndexWithinParent()+1;return S.select($,$)}return E.select(c,h)}selectNext(c,h){Or();const E=this.getNextSibling(),S=this.getParentOrThrow();if(E===null)return S.select();if(rt(E))return E.select(0,0);if(!Tt(E)){const $=E.getIndexWithinParent();return S.select($,$)}return E.select(c,h)}markDirty(){this.getWritable()}}function zt(g,c){const h=$n()._nodes.get(g);if(h===void 0)throw Error(`Create node: Attempted to create node ${c.name} that was not configured to be used on the editor.`);const E=h.klass;if(E!==c)throw Error(`Create node: Type ${g} in node ${c.name} does not match registered node ${E.name} with the same type`)}function Rn(g,c,h){const E=c.getParentOrThrow().getLastChild();let S=c;const $=[c];for(;S!==E;){if(!S.getNextSibling())throw Error("insertRangeAfter: lastToInsert must be a later sibling of firstToInsert");S=S.getNextSibling(),$.push(S)}let K=g;for(const G of $)K=K.insertAfter(G)}class Xn extends Rt{static getType(){return"linebreak"}static clone(c){return new Xn(c.__key)}constructor(c){super(c)}getTextContent(){return`
|
|
63
|
-
`}createDOM(){return document.createElement("br")}updateDOM(){return!1}static importDOM(){return{br:c=>{const h=c.parentElement;let E,S;return h!==null&&((E=h.firstChild)===c||E.nextSibling===c&&E.nodeType===Qe&&(E.textContent||"").match(/^( |\t|\r?\n)+$/)!==null)&&((S=h.lastChild)===c||S.previousSibling===c&&S.nodeType===Qe&&(S.textContent||"").match(/^( |\t|\r?\n)+$/)!==null)?null:{conversion:us,priority:0}}}}static importJSON(c){return Sr()}exportJSON(){return{type:"linebreak",version:1}}}function us(g){return{node:Sr()}}function Sr(){return fa(new Xn)}function Ao(g){return g instanceof Xn}function tl(g,c){return c&tt?"code":c&Lt?"mark":c&ht?"sub":c&Et?"sup":null}function Ea(g,c){return c&De?"strong":c&je?"em":"span"}function vd(g,c,h,E,S){const $=E.classList;let K=$i(S,"base");K!==void 0&&$.add(...K),K=$i(S,"underlineStrikethrough");let G=!1;const be=c&We&&c&Me,ye=h&We&&h&Me;K!==void 0&&(ye?(G=!0,be||$.add(...K)):be&&$.remove(...K));for(const Te in wr){const we=wr[Te];if(K=$i(S,Te),K!==void 0)if(h&we){if(G&&(Te==="underline"||Te==="strikethrough")){c&we&&$.remove(...K);continue}(!(c&we)||be&&Te==="underline"||Te==="strikethrough")&&$.add(...K)}else c&we&&$.remove(...K)}}function zc(g,c){const h=g.length,E=c.length;let S=0,$=0;for(;S<h&&S<E&&g[S]===c[S];)S++;for(;$+S<h&&$+S<E&&g[h-$-1]===c[E-$-1];)$++;return[S,h-S-$,c.slice(S,E-$)]}function Zr(g,c,h){const E=c.firstChild,S=h.isComposing(),$=g+(S?Kt:"");if(E==null)c.textContent=$;else{const K=E.nodeValue;if(K!==$)if(S||Se){const[G,be,ye]=zc(K,$);be!==0&&E.deleteData(G,be),E.insertData(G,ye)}else E.nodeValue=$}}function Ca(g,c,h,E,S,$){Zr(S,g,c);const K=$.theme.text;K!==void 0&&vd(h,0,E,g,K)}function wa(g,c){const h=document.createElement(c);return h.appendChild(g),h}class ai extends Rt{static getType(){return"text"}static clone(c){return new ai(c.__text,c.__key)}constructor(c,h){super(h),this.__text=c,this.__format=0,this.__style="",this.__mode=0,this.__detail=0}getFormat(){return this.getLatest().__format}getDetail(){return this.getLatest().__detail}getMode(){const c=this.getLatest();return Ee[c.__mode]}getStyle(){return this.getLatest().__style}isToken(){return this.getLatest().__mode===me}isComposing(){return this.__key===Vr()}isSegmented(){return this.getLatest().__mode===_e}isDirectionless(){return(this.getLatest().__detail&qe)!==0}isUnmergeable(){return(this.getLatest().__detail<)!==0}hasFormat(c){const h=wr[c];return(this.getFormat()&h)!==0}isSimpleText(){return this.__type==="text"&&this.__mode===0}getTextContent(){return this.getLatest().__text}getFormatFlags(c,h){const E=this.getLatest().__format;return tr(E,c,h)}createDOM(c){const h=this.__format,E=tl(this,h),S=Ea(this,h),$=E===null?S:E,K=document.createElement($);let G=K;this.hasFormat("code")&&K.setAttribute("spellcheck","false"),E!==null&&(G=document.createElement(S),K.appendChild(G));const be=this.__text;Ca(G,this,S,h,be,c);const ye=this.__style;return ye!==""&&(K.style.cssText=ye),K}updateDOM(c,h,E){const S=this.__text,$=c.__format,K=this.__format,G=tl(this,$),be=tl(this,K),ye=Ea(this,$),Te=Ea(this,K);if((G===null?ye:G)!==(be===null?Te:be))return!0;if(G===be&&ye!==Te){const Le=h.firstChild;if(Le==null)throw Error("updateDOM: prevInnerDOM is null or undefined");const Je=document.createElement(Te);return Ca(Je,this,Te,K,S,E),h.replaceChild(Je,Le),!1}let we=h;if(be!==null&&G!==null&&(we=h.firstChild,we==null))throw Error("updateDOM: innerDOM is null or undefined");Zr(S,we,this);const Oe=E.theme.text;Oe!==void 0&&$!==K&&vd(Te,$,K,we,Oe);const Ne=c.__style,ze=this.__style;return Ne!==ze&&(h.style.cssText=ze),!1}static importDOM(){return{"#text":()=>({conversion:Gc,priority:0}),b:()=>({conversion:yd,priority:0}),code:()=>({conversion:Jr,priority:0}),em:()=>({conversion:Jr,priority:0}),i:()=>({conversion:Jr,priority:0}),s:()=>({conversion:Jr,priority:0}),span:()=>({conversion:yh,priority:0}),strong:()=>({conversion:Jr,priority:0}),sub:()=>({conversion:Jr,priority:0}),sup:()=>({conversion:Jr,priority:0}),u:()=>({conversion:Jr,priority:0})}}static importJSON(c){const h=Un(c.text);return h.setFormat(c.format),h.setDetail(c.detail),h.setMode(c.mode),h.setStyle(c.style),h}exportDOM(c){let{element:h}=super.exportDOM(c);if(!(h!==null&&ni(h)))throw Error("Expected TextNode createDOM to always return a HTMLElement");return h.style.whiteSpace="pre-wrap",this.hasFormat("bold")&&(h=wa(h,"b")),this.hasFormat("italic")&&(h=wa(h,"i")),this.hasFormat("strikethrough")&&(h=wa(h,"s")),this.hasFormat("underline")&&(h=wa(h,"u")),{element:h}}exportJSON(){return{detail:this.getDetail(),format:this.getFormat(),mode:this.getMode(),style:this.getStyle(),text:this.getTextContent(),type:"text",version:1}}selectionTransform(c,h){}setFormat(c){const h=this.getWritable();return h.__format=typeof c=="string"?wr[c]:c,h}setDetail(c){const h=this.getWritable();return h.__detail=typeof c=="string"?Zn[c]:c,h}setStyle(c){const h=this.getWritable();return h.__style=c,h}toggleFormat(c){const h=this.getFormat(),E=tr(h,c,null);return this.setFormat(E)}toggleDirectionless(){const c=this.getWritable();return c.__detail^=qe,c}toggleUnmergeable(){const c=this.getWritable();return c.__detail^=lt,c}setMode(c){const h=ia[c];if(this.__mode===h)return this;const E=this.getWritable();return E.__mode=h,E}setTextContent(c){if(this.__text===c)return this;const h=this.getWritable();return h.__text=c,h}select(c,h){Or();let E=c,S=h;const $=_n(),K=this.getTextContent(),G=this.__key;if(typeof K=="string"){const be=K.length;E===void 0&&(E=be),S===void 0&&(S=be)}else E=0,S=0;if(wt($)){const be=Vr();(be===$.anchor.key||be===$.focus.key)&&kn(G),$.setTextNodeRange(this,E,this,S)}else return mv(G,E,G,S,"text","text");return $}selectStart(){return this.select(0,0)}selectEnd(){const c=this.getTextContentSize();return this.select(c,c)}spliceText(c,h,E,S){const $=this.getWritable(),K=$.__text,G=E.length;let be=c;be<0&&(be=G+be,be<0&&(be=0));const ye=_n();if(S&&wt(ye)){const we=c+G;ye.setTextNodeRange($,we,$,we)}const Te=K.slice(0,be)+E+K.slice(be+h);return $.__text=Te,$}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}splitText(...c){Or();const h=this.getLatest(),E=h.getTextContent(),S=h.__key,$=Vr(),K=new Set(c),G=[],be=E.length;let ye="";for(let It=0;It<be;It++)ye!==""&&K.has(It)&&(G.push(ye),ye=""),ye+=E[It];ye!==""&&G.push(ye);const Te=G.length;if(Te===0)return[];if(G[0]===E)return[h];const we=G[0],Oe=h.getParentOrThrow();let Ne;const ze=h.getFormat(),Le=h.getStyle(),Je=h.__detail;let ft=!1;h.isSegmented()?(Ne=Un(we),Ne.__format=ze,Ne.__style=Le,Ne.__detail=Je,ft=!0):(Ne=h.getWritable(),Ne.__text=we);const Ye=_n(),Pt=[Ne];let Bt=we.length;for(let It=1;It<Te;It++){const Jt=G[It],ln=Jt.length,Ft=Un(Jt).getWritable();Ft.__format=ze,Ft.__style=Le,Ft.__detail=Je;const zn=Ft.__key,Mo=Bt+ln;if(wt(Ye)){const Hi=Ye.anchor,dl=Ye.focus;Hi.key===S&&Hi.type==="text"&&Hi.offset>Bt&&Hi.offset<=Mo&&(Hi.key=zn,Hi.offset-=Bt,Ye.dirty=!0),dl.key===S&&dl.type==="text"&&dl.offset>Bt&&dl.offset<=Mo&&(dl.key=zn,dl.offset-=Bt,Ye.dirty=!0)}$===S&&kn(zn),Bt=Mo,Pt.push(Ft)}xc(this);const Mt=Oe.getWritable(),Vt=this.getIndexWithinParent();return ft?(Mt.splice(Vt,0,Pt),this.remove()):Mt.splice(Vt,1,Pt),wt(Ye)&&xd(Ye,Oe,Vt,Te-1),Pt}mergeWithSibling(c){const h=c===this.getPreviousSibling();if(!h&&c!==this.getNextSibling())throw Error("mergeWithSibling: sibling must be a previous or next sibling");const E=this.__key,S=c.__key,$=this.__text,K=$.length;Vr()===S&&kn(E);const G=_n();if(wt(G)){const we=G.anchor,Oe=G.focus;we!==null&&we.key===S&&(yv(we,h,E,c,K),G.dirty=!0),Oe!==null&&Oe.key===S&&(yv(Oe,h,E,c,K),G.dirty=!0)}const be=c.__text,ye=h?be+$:$+be;this.setTextContent(ye);const Te=this.getWritable();return c.remove(),Te}isTextEntity(){return!1}}function yh(g){const c=g,h=c.style.fontWeight==="700",E=c.style.textDecoration==="line-through",S=c.style.fontStyle==="italic",$=c.style.textDecoration==="underline",K=c.style.verticalAlign;return{forChild:G=>(Tt(G)&&(h&&G.toggleFormat("bold"),E&&G.toggleFormat("strikethrough"),S&&G.toggleFormat("italic"),$&&G.toggleFormat("underline"),K==="sub"&&G.toggleFormat("subscript"),K==="super"&&G.toggleFormat("superscript")),G),node:null}}function yd(g){const c=g.style.fontWeight==="normal";return{forChild:h=>(Tt(h)&&!c&&h.toggleFormat("bold"),h),node:null}}const Kc=new WeakMap;function nl(g){return g.nodeName==="PRE"||g.nodeType===Fe&&g.style!==void 0&&g.style.whiteSpace!==void 0&&g.style.whiteSpace.startsWith("pre")}function bd(g){let c,h=g.parentNode;const E=[g];for(;h!==null&&(c=Kc.get(h))===void 0&&!nl(h);)E.push(h),h=h.parentNode;const S=c===void 0?h:c;for(let $=0;$<E.length;$++)Kc.set(E[$],S);return S}function Gc(g){const c=g;if(g.parentElement===null)throw Error("Expected parentElement of Text not to be null");let h=c.textContent||"";if(bd(c)!==null){const E=h.split(/(\r?\n|\t)/),S=[],$=E.length;for(let K=0;K<$;K++){const G=E[K];G===`
|
|
64
|
-
`||G===`\r
|
|
65
|
-
`?S.push(Sr()):G===" "?S.push(Na()):G!==""&&S.push(Un(G))}return{node:S}}if(h=h.replace(/\r/g,"").replace(/[ \t\n]+/g," "),h==="")return{node:null};if(h[0]===" "){let E=c,S=!0;for(;E!==null&&(E=Vc(E,!1))!==null;){const $=E.textContent||"";if($.length>0){/[ \t\n]$/.test($)&&(h=h.slice(1)),S=!1;break}}S&&(h=h.slice(1))}if(h[h.length-1]===" "){let E=c,S=!0;for(;E!==null&&(E=Vc(E,!0))!==null;)if((E.textContent||"").replace(/^( |\t|\r?\n)+/,"").length>0){S=!1;break}S&&(h=h.slice(0,h.length-1))}return h===""?{node:null}:{node:Un(h)}}const Uc=new RegExp(/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/,"i");function Vc(g,c){let h=g;for(;;){let E;for(;(E=c?h.nextSibling:h.previousSibling)===null;){const $=h.parentElement;if($===null)return null;h=$}if(h=E,h.nodeType===Fe){const $=h.style.display;if($===""&&h.nodeName.match(Uc)===null||$!==""&&!$.startsWith("inline"))return null}let S=h;for(;(S=c?h.firstChild:h.lastChild)!==null;)h=S;if(h.nodeType===Qe)return h;if(h.nodeName==="BR")return null}}const ds={code:"code",em:"italic",i:"italic",s:"strikethrough",strong:"bold",sub:"subscript",sup:"superscript",u:"underline"};function Jr(g){const c=ds[g.nodeName.toLowerCase()];return c===void 0?{node:null}:{forChild:h=>(Tt(h)&&!h.hasFormat(c)&&h.toggleFormat(c),h),node:null}}function Un(g=""){return fa(new ai(g))}function Tt(g){return g instanceof ai}class si extends ai{static getType(){return"tab"}static clone(c){const h=new si(c.__key);return h.__text=c.__text,h.__format=c.__format,h.__style=c.__style,h}constructor(c){super(" ",c),this.__detail=lt}static importDOM(){return null}static importJSON(c){const h=Na();return h.setFormat(c.format),h.setStyle(c.style),h}exportJSON(){return{...super.exportJSON(),type:"tab",version:1}}setTextContent(c){throw Error("TabNode does not support setTextContent")}setDetail(c){throw Error("TabNode does not support setDetail")}setMode(c){throw Error("TabNode does not support setMode")}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}}function Na(){return fa(new si)}function fs(g){return g instanceof si}class rl{constructor(c,h,E){this._selection=null,this.key=c,this.offset=h,this.type=E}is(c){return this.key===c.key&&this.offset===c.offset&&this.type===c.type}isBefore(c){let h=this.getNode(),E=c.getNode();const S=this.offset,$=c.offset;return rt(h)&&(h=h.getDescendantByIndex(S)??h),rt(E)&&(E=E.getDescendantByIndex($)??E),h===E?S<$:h.isBefore(E)}getNode(){const c=this.key,h=Fn(c);if(h===null)throw Error("Point.getNode: node not found");return h}set(c,h,E){const S=this._selection,$=this.key;this.key=c,this.offset=h,this.type=E,ll()||(Vr()===$&&kn(c),S!==null&&(S.setCachedNodes(null),S.dirty=!0))}}function or(g,c,h){return new rl(g,c,h)}function Yc(g,c){let h=c.__key,E=g.offset,S="element";if(Tt(c)){S="text";const $=c.getTextContentSize();E>$&&(E=$)}else if(!rt(c)){const $=c.getNextSibling();if(Tt($))h=$.__key,E=0,S="text";else{const K=c.getParent();K&&(h=K.__key,E=c.getIndexWithinParent()+1)}}g.set(h,E,S)}function ol(g,c){if(rt(c)){const h=c.getLastDescendant();rt(h)||Tt(h)?Yc(g,h):Yc(g,c)}else Yc(g,c)}function _d(g,c,h,E){const S=g.getNode(),$=S.getChildAtIndex(g.offset),K=Un(),G=Qr(S)?Bi().append(K):K;K.setFormat(h),K.setStyle(E),$===null?S.append(G):$.insertBefore(G),g.is(c)&&c.set(K.__key,0,"text"),g.set(K.__key,0,"text")}function Ro(g,c,h,E){g.key=c,g.offset=h,g.type=E}class il{constructor(c,h){this.anchor=c,this.focus=h,c._selection=this,h._selection=this,this._cachedNodes=null,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(c){this._cachedNodes=c}is(c){return ir(c)?this.anchor.is(c.anchor)&&this.focus.is(c.focus):!1}isCollapsed(){return!1}extract(){return this.getNodes()}isBackward(){return this.focus.isBefore(this.anchor)}getCharacterOffsets(){return Do(this)}}class pn{constructor(c){this.dirty=!1,this._nodes=c,this._cachedNodes=null}getCachedNodes(){return this._cachedNodes}setCachedNodes(c){this._cachedNodes=c}is(c){if(!mr(c))return!1;const h=this._nodes,E=c._nodes;return h.size===E.size&&Array.from(h).every(S=>E.has(S))}add(c){this.dirty=!0,this._nodes.add(c),this._cachedNodes=null}delete(c){this.dirty=!0,this._nodes.delete(c),this._cachedNodes=null}clear(){this.dirty=!0,this._nodes.clear(),this._cachedNodes=null}has(c){return this._nodes.has(c)}clone(){return new pn(new Set(this._nodes))}extract(){return this.getNodes()}insertRawText(c){}insertText(){}insertNodes(c){const h=this.getNodes(),E=h.length,S=h[E-1];let $;if(Tt(S))$=S.select();else{const K=S.getIndexWithinParent()+1;$=S.getParentOrThrow().select(K,K)}$.insertNodes(c);for(let K=0;K<E;K++)h[K].remove()}getNodes(){const c=this._cachedNodes;if(c!==null)return c;const h=this._nodes,E=[];for(const S of h){const $=Fn(S);$!==null&&E.push($)}return ll()||(this._cachedNodes=E),E}getTextContent(){const c=this.getNodes();let h="";for(let E=0;E<c.length;E++)h+=c[E].getTextContent();return h}}function wt(g){return g instanceof ar}function ir(g){return g instanceof il}function Br(g){const[c,,h]=_v(g),E=h.getChildren(),S=E.length,$=E[0].getChildren().length,K=new Array(S);for(let G=0;G<S;G++)K[G]=new Array($);for(let G=0;G<S;G++){const be=E[G].getChildren();let ye=0;for(let Te=0;Te<be.length;Te++){for(;K[G][ye];)ye++;const we=be[Te],Oe=we.__rowSpan||1,Ne=we.__colSpan||1;for(let ze=0;ze<Oe;ze++)for(let Le=0;Le<Ne;Le++)K[G+ze][ye+Le]=we;if(c===we)return{colSpan:Ne,columnIndex:ye,rowIndex:G,rowSpan:Oe};ye+=Ne}}return null}class li extends il{constructor(c,h,E){super(h,E),this.gridKey=c}getCachedNodes(){return this._cachedNodes}setCachedNodes(c){this._cachedNodes=c}is(c){return Pr(c)?this.gridKey===c.gridKey&&this.anchor.is(c.anchor)&&this.focus.is(c.focus):!1}set(c,h,E){this.dirty=!0,this.gridKey=c,this.anchor.key=h,this.focus.key=E,this._cachedNodes=null}clone(){return new li(this.gridKey,this.anchor,this.focus)}isCollapsed(){return!1}extract(){return this.getNodes()}insertRawText(c){}insertText(){}insertNodes(c){const h=this.focus.getNode();aa(h.select(0,h.getChildrenSize())).insertNodes(c)}getShape(){const c=Fn(this.anchor.key);if(!go(c))throw Error("Expected GridSelection anchor to be (or a child of) GridCellNode");const h=Br(c);if(h===null)throw Error("getCellRect: expected to find AnchorNode");const E=Fn(this.focus.key);if(!go(E))throw Error("Expected GridSelection focus to be (or a child of) GridCellNode");const S=Br(E);if(S===null)throw Error("getCellRect: expected to find focusCellNode");const $=Math.min(h.columnIndex,S.columnIndex),K=Math.max(h.columnIndex,S.columnIndex),G=Math.min(h.rowIndex,S.rowIndex),be=Math.max(h.rowIndex,S.rowIndex);return{fromX:Math.min($,K),fromY:Math.min(G,be),toX:Math.max($,K),toY:Math.max(G,be)}}getNodes(){const c=this._cachedNodes;if(c!==null)return c;const h=this.anchor.getNode(),E=this.focus.getNode(),S=Di(h,go),$=Di(E,go);if(!go(S))throw Error("Expected GridSelection anchor to be (or a child of) GridCellNode");if(!go($))throw Error("Expected GridSelection focus to be (or a child of) GridCellNode");const K=S.getParent();if(!Jc(K))throw Error("Expected anchorCell to have a parent GridRowNode");const G=K.getParent();if(!Sh(G))throw Error("Expected tableNode to have a parent GridNode");const be=$.getParents()[1];if(be!==G){if(G.isParentOf($)){const It=be.getParent();if(It==null)throw Error("Expected focusCellParent to have a parent");this.set(this.gridKey,$.getKey(),It.getKey())}else{const It=G.getParent();if(It==null)throw Error("Expected gridParent to have a parent");this.set(this.gridKey,It.getKey(),$.getKey())}return this.getNodes()}const[ye,Te,we]=bv(G,S,$);let Oe=Math.min(Te.startColumn,we.startColumn),Ne=Math.min(Te.startRow,we.startRow),ze=Math.max(Te.startColumn+Te.cell.__colSpan-1,we.startColumn+we.cell.__colSpan-1),Le=Math.max(Te.startRow+Te.cell.__rowSpan-1,we.startRow+we.cell.__rowSpan-1),Je=Oe,ft=Ne,Ye=Oe,Pt=Ne;function Bt(It){const{cell:Jt,startColumn:ln,startRow:Ft}=It;Oe=Math.min(Oe,ln),Ne=Math.min(Ne,Ft),ze=Math.max(ze,ln+Jt.__colSpan-1),Le=Math.max(Le,Ft+Jt.__rowSpan-1)}for(;Oe<Je||Ne<ft||ze>Ye||Le>Pt;){if(Oe<Je){const It=Pt-ft,Jt=Je-1;for(let ln=0;ln<=It;ln++)Bt(ye[ft+ln][Jt]);Je=Jt}if(Ne<ft){const It=Ye-Je,Jt=ft-1;for(let ln=0;ln<=It;ln++)Bt(ye[Jt][Je+ln]);ft=Jt}if(ze>Ye){const It=Pt-ft,Jt=Ye+1;for(let ln=0;ln<=It;ln++)Bt(ye[ft+ln][Jt]);Ye=Jt}if(Le>Pt){const It=Ye-Je,Jt=Pt+1;for(let ln=0;ln<=It;ln++)Bt(ye[Jt][Je+ln]);Pt=Jt}}const Mt=[G];let Vt=null;for(let It=Ne;It<=Le;It++)for(let Jt=Oe;Jt<=ze;Jt++){const{cell:ln}=ye[It][Jt],Ft=ln.getParent();if(!Jc(Ft))throw Error("Expected GridCellNode parent to be a GridRowNode");Ft!==Vt&&Mt.push(Ft),Mt.push(ln,...cd(ln)),Vt=Ft}return ll()||(this._cachedNodes=Mt),Mt}getTextContent(){const c=this.getNodes();let h="";for(let E=0;E<c.length;E++)h+=c[E].getTextContent();return h}}function Pr(g){return g instanceof li}class ar extends il{constructor(c,h,E,S){super(c,h),this.format=E,this.style=S}getCachedNodes(){return this._cachedNodes}setCachedNodes(c){this._cachedNodes=c}is(c){return wt(c)?this.anchor.is(c.anchor)&&this.focus.is(c.focus)&&this.format===c.format&&this.style===c.style:!1}isCollapsed(){return this.anchor.is(this.focus)}getNodes(){const c=this._cachedNodes;if(c!==null)return c;const h=this.anchor,E=this.focus,S=h.isBefore(E),$=S?h:E,K=S?E:h;let G=$.getNode(),be=K.getNode();const ye=$.offset,Te=K.offset;if(rt(G)&&(G=G.getDescendantByIndex(ye)??G),rt(be)){let Oe=be.getDescendantByIndex(Te);Oe!==null&&Oe!==G&&be.getChildAtIndex(Te)===Oe&&(Oe=Oe.getPreviousSibling()),be=Oe??be}let we;return G.is(be)?rt(G)&&G.getChildrenSize()>0?we=[]:we=[G]:we=G.getNodesBetween(be),ll()||(this._cachedNodes=we),we}setTextNodeRange(c,h,E,S){Ro(this.anchor,c.__key,h,"text"),Ro(this.focus,E.__key,S,"text"),this._cachedNodes=null,this.dirty=!0}getTextContent(){const c=this.getNodes();if(c.length===0)return"";const h=c[0],E=c[c.length-1],S=this.anchor,$=this.focus,K=S.isBefore($),[G,be]=Do(this);let ye="",Te=!0;for(let we=0;we<c.length;we++){const Oe=c[we];if(rt(Oe)&&!Oe.isInline())Te||(ye+=`
|
|
66
|
-
`),Oe.isEmpty()?Te=!1:Te=!0;else if(Te=!1,Tt(Oe)){let Ne=Oe.getTextContent();Oe===h?Oe===E?(S.type!=="element"||$.type!=="element"||$.offset===S.offset)&&(Ne=G<be?Ne.slice(G,be):Ne.slice(be,G)):Ne=K?Ne.slice(G):Ne.slice(be):Oe===E&&(Ne=K?Ne.slice(0,be):Ne.slice(0,G)),ye+=Ne}else(Wn(Oe)||Ao(Oe))&&(Oe!==E||!this.isCollapsed())&&(ye+=Oe.getTextContent())}return ye}applyDOMRange(c){const h=$n(),E=h.getEditorState()._selection,S=gv(c.startContainer,c.startOffset,c.endContainer,c.endOffset,h,E);if(S===null)return;const[$,K]=S;Ro(this.anchor,$.key,$.offset,$.type),Ro(this.focus,K.key,K.offset,K.type),this._cachedNodes=null}clone(){const c=this.anchor,h=this.focus;return new ar(or(c.key,c.offset,c.type),or(h.key,h.offset,h.type),this.format,this.style)}toggleFormat(c){this.format=tr(this.format,c,null),this.dirty=!0}setStyle(c){this.style=c,this.dirty=!0}hasFormat(c){const h=wr[c];return(this.format&h)!==0}insertRawText(c){const h=c.split(/(\r?\n|\t)/),E=[],S=h.length;for(let $=0;$<S;$++){const K=h[$];K===`
|
|
67
|
-
`||K===`\r
|
|
68
|
-
`?E.push(Sr()):K===" "?E.push(Na()):E.push(Un(K))}this.insertNodes(E)}insertText(c){const h=this.anchor,E=this.focus,S=this.isCollapsed()||h.isBefore(E),$=this.format,K=this.style;S&&h.type==="element"?_d(h,E,$,K):!S&&E.type==="element"&&_d(E,h,$,K);const G=this.getNodes(),be=G.length,ye=S?h:E,Te=S?E:h,we=ye.offset,Oe=Te.offset;let Ne=G[0];if(!Tt(Ne))throw Error("insertText: first node is not a text node");const ze=Ne.getTextContent().length,Le=Ne.getParentOrThrow(),Je=be-1;let ft=G[Je];if(this.isCollapsed()&&we===ze&&(Ne.isSegmented()||Ne.isToken()||!Ne.canInsertTextAfter()||!Le.canInsertTextAfter()&&Ne.getNextSibling()===null)){let Ye=Ne.getNextSibling();if((!Tt(Ye)||!Ye.canInsertTextBefore()||Ls(Ye))&&(Ye=Un(),Ye.setFormat($),Le.canInsertTextAfter()?Ne.insertAfter(Ye):Le.insertAfter(Ye)),Ye.select(0,0),Ne=Ye,c!==""){this.insertText(c);return}}else if(this.isCollapsed()&&we===0&&(Ne.isSegmented()||Ne.isToken()||!Ne.canInsertTextBefore()||!Le.canInsertTextBefore()&&Ne.getPreviousSibling()===null)){let Ye=Ne.getPreviousSibling();if((!Tt(Ye)||Ls(Ye))&&(Ye=Un(),Ye.setFormat($),Le.canInsertTextBefore()?Ne.insertBefore(Ye):Le.insertBefore(Ye)),Ye.select(),Ne=Ye,c!==""){this.insertText(c);return}}else if(Ne.isSegmented()&&we!==ze){const Ye=Un(Ne.getTextContent());Ye.setFormat($),Ne.replace(Ye),Ne=Ye}else if(!this.isCollapsed()&&c!==""){const Ye=ft.getParent();if(!Le.canInsertTextBefore()||!Le.canInsertTextAfter()||rt(Ye)&&(!Ye.canInsertTextBefore()||!Ye.canInsertTextAfter())){this.insertText(""),pv(this.anchor,this.focus,null),this.insertText(c);return}}if(be===1){if(Ne.isToken()){const Mt=Un(c);Mt.select(),Ne.replace(Mt);return}const Ye=Ne.getFormat(),Pt=Ne.getStyle();if(we===Oe&&(Ye!==$||Pt!==K))if(Ne.getTextContent()==="")Ne.setFormat($),Ne.setStyle(K);else{const Mt=Un(c);if(Mt.setFormat($),Mt.setStyle(K),Mt.select(),we===0)Ne.insertBefore(Mt,!1);else{const[Vt]=Ne.splitText(we);Vt.insertAfter(Mt,!1)}Mt.isComposing()&&this.anchor.type==="text"&&(this.anchor.offset-=c.length);return}else if(fs(Ne)){const Mt=Un(c);Mt.setFormat($),Mt.setStyle(K),Mt.select(),Ne.replace(Mt);return}const Bt=Oe-we;Ne=Ne.spliceText(we,Bt,c,!0),Ne.getTextContent()===""?Ne.remove():this.anchor.type==="text"&&(Ne.isComposing()?this.anchor.offset-=c.length:(this.format=Ye,this.style=Pt))}else{const Ye=new Set([...Ne.getParentKeys(),...ft.getParentKeys()]),Pt=rt(Ne)?Ne:Ne.getParentOrThrow();let Bt=rt(ft)?ft:ft.getParentOrThrow(),Mt=ft;if(!Pt.is(Bt)&&Bt.isInline())do Mt=Bt,Bt=Bt.getParentOrThrow();while(Bt.isInline());if(Te.type==="text"&&(Oe!==0||ft.getTextContent()==="")||Te.type==="element"&&ft.getIndexWithinParent()<Oe)if(Tt(ft)&&!ft.isToken()&&Oe!==ft.getTextContentSize()){if(ft.isSegmented()){const Ft=Un(ft.getTextContent());ft.replace(Ft),ft=Ft}!Qr(Te.getNode())&&Te.type==="text"&&(ft=ft.spliceText(0,Oe,"")),Ye.add(ft.__key)}else{const Ft=ft.getParentOrThrow();!Ft.canBeEmpty()&&Ft.getChildrenSize()===1?Ft.remove():ft.remove()}else Ye.add(ft.__key);const Vt=Bt.getChildren(),It=new Set(G),Jt=Pt.is(Bt),ln=Pt.isInline()&&Ne.getNextSibling()===null?Pt:Ne;for(let Ft=Vt.length-1;Ft>=0;Ft--){const zn=Vt[Ft];if(zn.is(Ne)||rt(zn)&&zn.isParentOf(Ne))break;zn.isAttached()&&(!It.has(zn)||zn.is(Mt)?Jt||ln.insertAfter(zn,!1):zn.remove())}if(!Jt){let Ft=Bt,zn=null;for(;Ft!==null;){const Mo=Ft.getChildren(),Hi=Mo.length;(Hi===0||Mo[Hi-1].is(zn))&&(Ye.delete(Ft.__key),zn=Ft),Ft=Ft.getParent()}}if(!Ne.isToken())Ne=Ne.spliceText(we,ze-we,c,!0),Ne.getTextContent()===""?Ne.remove():Ne.isComposing()&&this.anchor.type==="text"&&(this.anchor.offset-=c.length);else if(we===ze)Ne.select();else{const Ft=Un(c);Ft.select(),Ne.replace(Ft)}for(let Ft=1;Ft<be;Ft++){const zn=G[Ft],Mo=zn.__key;Ye.has(Mo)||zn.remove()}}}removeText(){this.insertText("")}formatText(c){if(this.isCollapsed()){this.toggleFormat(c),kn(null);return}const h=this.getNodes(),E=[];for(const Ye of h)Tt(Ye)&&E.push(Ye);const S=E.length;if(S===0){this.toggleFormat(c),kn(null);return}const $=this.anchor,K=this.focus,G=this.isBackward(),be=G?K:$,ye=G?$:K;let Te=0,we=E[0],Oe=be.type==="element"?0:be.offset;if(be.type==="text"&&Oe===we.getTextContentSize()&&(Te=1,we=E[1],Oe=0),we==null)return;const Ne=we.getFormatFlags(c,null),ze=S-1;let Le=E[ze];const Je=ye.type==="text"?ye.offset:Le.getTextContentSize();if(we.is(Le)){if(Oe===Je)return;if(Oe===0&&Je===we.getTextContentSize())we.setFormat(Ne);else{const Ye=we.splitText(Oe,Je),Pt=Oe===0?Ye[0]:Ye[1];Pt.setFormat(Ne),be.type==="text"&&be.set(Pt.__key,0,"text"),ye.type==="text"&&ye.set(Pt.__key,Je-Oe,"text")}this.format=Ne;return}Oe!==0&&([,we]=we.splitText(Oe),Oe=0),we.setFormat(Ne);const ft=Le.getFormatFlags(c,Ne);Je>0&&(Je!==Le.getTextContentSize()&&([Le]=Le.splitText(Je)),Le.setFormat(ft));for(let Ye=Te+1;Ye<ze;Ye++){const Pt=E[Ye];if(!Pt.isToken()){const Bt=Pt.getFormatFlags(c,ft);Pt.setFormat(Bt)}}be.type==="text"&&be.set(we.__key,Oe,"text"),ye.type==="text"&&ye.set(Le.__key,Je,"text"),this.format=Ne|ft}insertNodes(c){if(c.length===0)return;if(this.anchor.key==="root"){this.insertParagraph();const Le=_n();if(!wt(Le))throw Error("Expected RangeSelection after insertParagraph");return Le.insertNodes(c)}const h=os(this.anchor.getNode(),pa),E=c[c.length-1];if("__language"in h){if("__language"in c[0])this.insertText(c[0].getTextContent());else{const Le=xh(this);h.splice(Le,0,c),E.selectEnd()}return}const S=Le=>(rt(Le)||Wn(Le))&&!Le.isInline();if(!c.some(S)){const Le=xh(this);h.splice(Le,0,c),E.selectEnd();return}const $=ZS(c),K=$.getLastDescendant(),G=$.getChildren(),be=Le=>"__value"in Le&&"__checked"in Le,ye=Le=>rt(Le)&&pa(Le)&&!Le.isEmpty()&&rt(h)&&(!h.isEmpty()||be(h)),Te=!rt(h)||!h.isEmpty()?this.insertParagraph():null,we=G[G.length-1];let Oe=G[0];ye(Oe)&&(h.append(...Oe.getChildren()),Oe=G[1]),Oe&&Rn(h,Oe);const Ne=os(K,pa);Te&&rt(Ne)&&(be(Te)||pa(we))&&(Ne.append(...Te.getChildren()),Te.remove()),rt(h)&&h.isEmpty()&&h.remove(),K.selectEnd();const ze=rt(h)?h.getLastChild():null;Ao(ze)&&Ne!==h&&ze.remove()}insertParagraph(){if(this.anchor.key==="root"){const K=Bi();return hr().splice(this.anchor.offset,0,[K]),K.select(),K}const c=xh(this),h=os(this.anchor.getNode(),pa),E=h.getChildAtIndex(c),S=E?[E,...E.getNextSiblings()]:[],$=h.insertNewAfter(this,!1);return $?($.append(...S),$.selectStart(),$):null}insertLineBreak(c){const h=Sr();if(this.insertNodes([h]),c){const E=h.getParentOrThrow(),S=h.getIndexWithinParent();E.select(S,S)}}extract(){const c=this.getNodes(),h=c.length,E=h-1,S=this.anchor,$=this.focus;let K=c[0],G=c[E];const[be,ye]=Do(this);if(h===0)return[];if(h===1){if(Tt(K)&&!this.isCollapsed()){const we=be>ye?ye:be,Oe=be>ye?be:ye,Ne=K.splitText(we,Oe),ze=we===0?Ne[0]:Ne[1];return ze!=null?[ze]:[]}return[K]}const Te=S.isBefore($);if(Tt(K)){const we=Te?be:ye;we===K.getTextContentSize()?c.shift():we!==0&&([,K]=K.splitText(we),c[0]=K)}if(Tt(G)){const we=G.getTextContent().length,Oe=Te?ye:be;Oe===0?c.pop():Oe!==we&&([G]=G.splitText(Oe),c[E]=G)}return c}modify(c,h,E){const S=this.focus,$=this.anchor,K=c==="move",G=da(S,h);if(Wn(G)&&!G.isIsolated()){if(K&&G.isKeyboardSelectable()){const Ne=bh();Ne.add(G.__key),pr(Ne);return}const Oe=h?G.getPreviousSibling():G.getNextSibling();if(Tt(Oe)){const Ne=Oe.__key,ze=h?Oe.getTextContent().length:0;S.set(Ne,ze,"text"),K&&$.set(Ne,ze,"text");return}else{const Ne=G.getParentOrThrow();let ze,Le;rt(Oe)?(Le=Oe.__key,ze=h?Oe.getChildrenSize():0):(ze=G.getIndexWithinParent(),Le=Ne.__key,h||ze++),S.set(Le,ze,"element"),K&&$.set(Le,ze,"element");return}}const be=$n(),ye=Fr(be._window);if(!ye)return;const Te=be._blockCursorElement,we=be._rootElement;if(we!==null&&Te!==null&&rt(G)&&!G.isInline()&&!G.canBeEmpty()&&ha(Te,be,we),ji(ye,c,h?"backward":"forward",E),ye.rangeCount>0){const Oe=ye.getRangeAt(0),Ne=this.anchor.getNode(),ze=Qr(Ne)?Ne:Mc(Ne);if(this.applyDOMRange(Oe),this.dirty=!0,!K){const Le=this.getNodes(),Je=[];let ft=!1;for(let Ye=0;Ye<Le.length;Ye++){const Pt=Le[Ye];jn(Pt,ze)?Je.push(Pt):ft=!0}if(ft&&Je.length>0)if(h){const Ye=Je[0];rt(Ye)?Ye.selectStart():Ye.getParentOrThrow().selectStart()}else{const Ye=Je[Je.length-1];rt(Ye)?Ye.selectEnd():Ye.getParentOrThrow().selectEnd()}(ye.anchorNode!==Oe.startContainer||ye.anchorOffset!==Oe.startOffset)&&Ir(this)}}}deleteCharacter(c){const h=this.isCollapsed();if(this.isCollapsed()){const E=this.anchor,S=this.focus;let $=E.getNode();if(!c&&(E.type==="element"&&rt($)&&E.offset===$.getChildrenSize()||E.type==="text"&&E.offset===$.getTextContentSize())){const G=$.getParent(),be=$.getNextSibling()||(G===null?null:G.getNextSibling());if(rt(be)&&be.isShadowRoot())return}const K=da(S,c);if(Wn(K)&&!K.isIsolated()){if(K.isKeyboardSelectable()&&rt($)&&$.getChildrenSize()===0){$.remove();const G=bh();G.add(K.__key),pr(G)}else K.remove(),$n().dispatchCommand(t,void 0);return}else if(!c&&rt(K)&&rt($)&&$.isEmpty()){$.remove(),K.selectStart();return}if(this.modify("extend",c,"character"),this.isCollapsed()){if(c&&E.offset===0&&(E.type==="element"?E.getNode():E.getNode().getParentOrThrow()).collapseAtStart(this))return}else{const G=S.type==="text"?S.getNode():null;if($=E.type==="text"?E.getNode():null,G!==null&&G.isSegmented()){const be=S.offset,ye=G.getTextContentSize();if(G.is($)||c&&be!==ye||!c&&be!==0){qc(G,c,be);return}}else if($!==null&&$.isSegmented()){const be=E.offset,ye=$.getTextContentSize();if($.is(G)||c&&be!==0||!c&&be!==ye){qc($,c,be);return}}al(this,c)}}if(this.removeText(),c&&!h&&this.isCollapsed()&&this.anchor.type==="element"&&this.anchor.offset===0){const E=this.anchor.getNode();E.isEmpty()&&Qr(E.getParent())&&E.getIndexWithinParent()===0&&E.collapseAtStart(this)}}deleteLine(c){this.isCollapsed()&&(this.anchor.type==="text"&&this.modify("extend",c,"lineboundary"),(c?this.focus:this.anchor).offset===0&&this.modify("extend",c,"character")),this.removeText()}deleteWord(c){this.isCollapsed()&&this.modify("extend",c,"word"),this.removeText()}}function mr(g){return g instanceof pn}function $o(g){const c=g.offset;if(g.type==="text")return c;const h=g.getNode();return c===h.getChildrenSize()?h.getTextContent().length:0}function Do(g){const c=g.anchor,h=g.focus;return c.type==="element"&&h.type==="element"&&c.key===h.key&&c.offset===h.offset?[0,0]:[$o(c),$o(h)]}function Ir(g){const c=g.focus,h=g.anchor,E=h.key,S=h.offset,$=h.type;Ro(h,c.key,c.offset,c.type),Ro(c,E,S,$),g._cachedNodes=null}function ji(g,c,h,E){g.modify(c,h,E)}function al(g,c){const h=g.anchor,E=g.focus,S=h.getNode(),$=E.getNode();if(S===$&&h.type==="text"&&E.type==="text"){const K=h.offset,G=E.offset,be=K<G,ye=be?K:G,Te=be?G:K,we=Te-1;if(ye!==we){const Oe=S.getTextContent().slice(ye,Te);Cc(Oe)||(c?E.offset=we:h.offset=we)}}}function qc(g,c,h){const E=g,S=E.getTextContent().split(/(?=\s)/g),$=S.length;let K=0,G=0;for(let ye=0;ye<$;ye++){const Te=S[ye],we=ye===$-1;if(G=K,K+=Te.length,c&&K===h||K>h||we){S.splice(ye,1),we&&(G=void 0);break}}const be=S.join("").trim();be===""?E.remove():(E.setTextContent(be),E.select(G,G))}function HS(g,c,h){const E=g.getParent();return h===null||E===null||!E.canBeEmpty()||E!==h.getNode()}function fv(g,c,h,E){let S=c,$;if(g.nodeType===Fe){let K=!1;const G=g.childNodes,be=G.length;S===be&&(K=!0,S=be-1);let ye=G[S],Te=!1;if(ye===E._blockCursorElement?(ye=G[S+1],Te=!0):E._blockCursorElement!==null&&S--,$=Ti(ye),Tt($))S=Va($,K);else{let we=Ti(g);if(we===null)return null;if(rt(we)){let Oe=we.getChildAtIndex(S);if(rt(Oe)&&HS(Oe,S,h)){const Ne=K?Oe.getLastDescendant():Oe.getFirstDescendant();Ne===null?(we=Oe,S=0):(Oe=Ne,we=rt(Oe)?Oe:Oe.getParentOrThrow())}Tt(Oe)?($=Oe,we=null,S=Va(Oe,K)):Oe!==we&&K&&!Te&&S++}else{const Oe=we.getIndexWithinParent();c===0&&Wn(we)&&Ti(g)===we?S=Oe:S=Oe+1,we=we.getParentOrThrow()}if(rt(we))return or(we.__key,S,"element")}}else $=Ti(g);return Tt($)?or($.__key,S,"text"):null}function hv(g,c,h){const E=g.offset,S=g.getNode();if(E===0){const $=S.getPreviousSibling(),K=S.getParent();if(!c)rt($)&&!h&&$.isInline()?(g.key=$.__key,g.offset=$.getChildrenSize(),g.type="element"):Tt($)&&(g.key=$.__key,g.offset=$.getTextContent().length);else if((h||!c)&&$===null&&rt(K)&&K.isInline()){const G=K.getPreviousSibling();Tt(G)&&(g.key=G.__key,g.offset=G.getTextContent().length)}}else if(E===S.getTextContent().length){const $=S.getNextSibling(),K=S.getParent();if(c&&rt($)&&$.isInline())g.key=$.__key,g.offset=0,g.type="element";else if((h||c)&&$===null&&rt(K)&&K.isInline()&&!K.canInsertTextAfter()){const G=K.getNextSibling();Tt(G)&&(g.key=G.__key,g.offset=0)}}}function pv(g,c,h){if(g.type==="text"&&c.type==="text"){const E=g.isBefore(c),S=g.is(c);hv(g,E,S),hv(c,!E,S),S&&(c.key=g.key,c.offset=g.offset,c.type=g.type);const $=$n();if($.isComposing()&&$._compositionKey!==g.key&&wt(h)){const K=h.anchor,G=h.focus;Ro(g,K.key,K.offset,K.type),Ro(c,G.key,G.offset,G.type)}}}function gv(g,c,h,E,S,$){if(g===null||h===null||!Xo(S,g,h))return null;const K=fv(g,c,wt($)?$.anchor:null,S);if(K===null)return null;const G=fv(h,E,wt($)?$.focus:null,S);if(G===null)return null;if(K.type==="element"&&G.type==="element"){const be=Ti(g),ye=Ti(h);if(Wn(be)&&Wn(ye))return null}return pv(K,G,$),[K,G]}function WS(g){return rt(g)&&!g.isInline()}function mv(g,c,h,E,S,$){const K=ci(),G=new ar(or(g,c,S),or(h,E,$),0,"");return G.dirty=!0,K._selection=G,G}function zS(){const g=or("root",0,"element"),c=or("root",0,"element");return new ar(g,c,0,"")}function bh(){return new pn(new Set)}function KS(){const g=or("root",0,"element"),c=or("root",0,"element");return new li("root",g,c)}function GS(g){const c=g.getEditorState()._selection,h=Fr(g._window);return wt(c)||c==null?_h(c,h,g):c.clone()}function _h(g,c,h){const E=h._window;if(E===null)return null;const S=E.event,$=S?S.type:void 0,K=$==="selectionchange",G=!at()&&(K||$==="beforeinput"||$==="compositionstart"||$==="compositionend"||$==="click"&&S&&S.detail===3||$==="drop"||$===void 0);let be,ye,Te,we;if(!wt(g)||G){if(c===null)return null;if(be=c.anchorNode,ye=c.focusNode,Te=c.anchorOffset,we=c.focusOffset,K&&wt(g)&&!Xo(h,be,ye))return g.clone()}else return g.clone();const Oe=gv(be,Te,ye,we,h,g);if(Oe===null)return null;const[Ne,ze]=Oe;return new ar(Ne,ze,wt(g)?g.format:0,wt(g)?g.style:"")}function _n(){return ci()._selection}function sl(){return $n()._editorState._selection}function xd(g,c,h,E=1){const S=g.anchor,$=g.focus,K=S.getNode(),G=$.getNode();if(!c.is(K)&&!c.is(G))return;const be=c.__key;if(g.isCollapsed()){const ye=S.offset;if(h<=ye&&E>0||h<ye&&E<0){const Te=Math.max(0,ye+E);S.set(be,Te,"element"),$.set(be,Te,"element"),vv(g)}}else{const ye=g.isBackward(),Te=ye?$:S,we=Te.getNode(),Oe=ye?S:$,Ne=Oe.getNode();if(c.is(we)){const ze=Te.offset;(h<=ze&&E>0||h<ze&&E<0)&&Te.set(be,Math.max(0,ze+E),"element")}if(c.is(Ne)){const ze=Oe.offset;(h<=ze&&E>0||h<ze&&E<0)&&Oe.set(be,Math.max(0,ze+E),"element")}}vv(g)}function vv(g){const c=g.anchor,h=c.offset,E=g.focus,S=E.offset,$=c.getNode(),K=E.getNode();if(g.isCollapsed()){if(!rt($))return;const G=$.getChildrenSize(),be=h>=G,ye=be?$.getChildAtIndex(G-1):$.getChildAtIndex(h);if(Tt(ye)){let Te=0;be&&(Te=ye.getTextContentSize()),c.set(ye.__key,Te,"text"),E.set(ye.__key,Te,"text")}return}if(rt($)){const G=$.getChildrenSize(),be=h>=G,ye=be?$.getChildAtIndex(G-1):$.getChildAtIndex(h);if(Tt(ye)){let Te=0;be&&(Te=ye.getTextContentSize()),c.set(ye.__key,Te,"text")}}if(rt(K)){const G=K.getChildrenSize(),be=S>=G,ye=be?K.getChildAtIndex(G-1):K.getChildAtIndex(S);if(Tt(ye)){let Te=0;be&&(Te=ye.getTextContentSize()),E.set(ye.__key,Te,"text")}}}function US(g,c){const h=c.getEditorState()._selection,E=g._selection;if(wt(E)){const S=E.anchor,$=E.focus;let K;if(S.type==="text"&&(K=S.getNode(),K.selectionTransform(h,E)),$.type==="text"){const G=$.getNode();K!==G&&G.selectionTransform(h,E)}}}function Ed(g,c,h,E,S){let $=null,K=0,G=null;E!==null?($=E.__key,Tt(E)?(K=E.getTextContentSize(),G="text"):rt(E)&&(K=E.getChildrenSize(),G="element")):S!==null&&($=S.__key,Tt(S)?G="text":rt(S)&&(G="element")),$!==null&&G!==null?g.set($,K,G):(K=c.getIndexWithinParent(),K===-1&&(K=h.getChildrenSize()),g.set(h.__key,K,"element"))}function yv(g,c,h,E,S){g.type==="text"?(g.key=h,c||(g.offset+=S)):g.offset>E.getIndexWithinParent()&&(g.offset-=1)}function VS(g,c,h,E,S,$,K){const G=E.anchorNode,be=E.focusNode,ye=E.anchorOffset,Te=E.focusOffset,we=document.activeElement;if(S.has("collaboration")&&we!==$||we!==null&&bc(we))return;if(!wt(c)){g!==null&&Xo(h,G,be)&&E.removeAllRanges();return}const Oe=c.anchor,Ne=c.focus,ze=Oe.key,Le=Ne.key,Je=ns(h,ze),ft=ns(h,Le),Ye=Oe.offset,Pt=Ne.offset,Bt=c.format,Mt=c.style,Vt=c.isCollapsed();let It=Je,Jt=ft,ln=!1;if(Oe.type==="text"){It=An(Je);const Ft=Oe.getNode();ln=Ft.getFormat()!==Bt||Ft.getStyle()!==Mt}else wt(g)&&g.anchor.type==="text"&&(ln=!0);if(Ne.type==="text"&&(Jt=An(ft)),!(It===null||Jt===null)&&(Vt&&(g===null||ln||wt(g)&&(g.format!==Bt||g.style!==Mt))&&it(Bt,Mt,Ye,ze,performance.now()),!(ye===Ye&&Te===Pt&&G===It&&be===Jt&&!(E.type==="Range"&&Vt)&&((we===null||!$.contains(we))&&$.focus({preventScroll:!0}),Oe.type!=="element")))){try{E.setBaseAndExtent(It,Ye,Jt,Pt)}catch{}if(!S.has("skip-scroll-into-view")&&c.isCollapsed()&&$!==null&&$===document.activeElement){const Ft=c instanceof ar&&c.anchor.type==="element"?It.childNodes[Ye]||null:E.rangeCount>0?E.getRangeAt(0):null;if(Ft!==null){let zn;if(Ft instanceof Text){const Mo=document.createRange();Mo.selectNode(Ft),zn=Mo.getBoundingClientRect()}else zn=Ft.getBoundingClientRect();gh(h,zn,$)}}Ie()}}function YS(g){let c=_n()||sl();c===null&&(c=hr().selectEnd()),c.insertNodes(g)}function qS(){const g=_n();return g===null?"":g.getTextContent()}function bv(g,c,h){const E=[];let S=null,$=null;function K(ye,Te,we){const Oe={cell:we,startColumn:Te,startRow:ye},Ne=we.__rowSpan,ze=we.__colSpan;for(let Le=0;Le<Ne;Le++){E[ye+Le]===void 0&&(E[ye+Le]=[]);for(let Je=0;Je<ze;Je++)E[ye+Le][Te+Je]=Oe}c.is(we)&&(S=Oe),h.is(we)&&($=Oe)}function G(ye,Te){return E[ye]===void 0||E[ye][Te]===void 0}const be=g.getChildren();for(let ye=0;ye<be.length;ye++){const Te=be[ye];if(!Jc(Te))throw Error("Expected GridNode children to be GridRowNode");const we=Te.getChildren();let Oe=0;for(const Ne of we){if(!go(Ne))throw Error("Expected GridRowNode children to be GridCellNode");for(;!G(ye,Oe);)Oe++;K(ye,Oe,Ne),Oe+=Ne.__colSpan}}if(S===null)throw Error("Anchor not found in Grid");if($===null)throw Error("Focus not found in Grid");return[E,S,$]}function _v(g){let c;if(g instanceof Th)c=g;else if(g instanceof Rt){const S=Di(g,go);if(!go(S))throw Error("Expected to find a parent GridCellNode");c=S}else{const S=Di(g.getNode(),go);if(!go(S))throw Error("Expected to find a parent GridCellNode");c=S}const h=c.getParent();if(!Jc(h))throw Error("Expected GridCellNode to have a parent GridRowNode");const E=h.getParent();if(!Sh(E))throw Error("Expected GridRowNode to have a parent GridNode");return[c,h,E]}function xh(g){g.isCollapsed()||g.removeText();const c=g.anchor,h=c.getNode();if(!Tt(h))return c.offset;const E=h.getParent();if(!E){const be=Bi();return hr().append(be),be.select(),0}const S=h.splitText(c.offset);if(S.length===0)return 0;const $=c.offset===0?0:1,K=S[0].getIndexWithinParent()+$;if(!E.isInline()||K===0)return K;const G=E.getChildAtIndex(K);return G&&E.insertNewAfter(g).append(G,...G.getNextSiblings()),E.getIndexWithinParent()+$}function ZS(g){const c=Bi();let h=null;for(let E=0;E<g.length;E++){const S=g[E],$=Ao(S);if($||Wn(S)&&S.isInline()||rt(S)&&S.isInline()||Tt(S)||S.isParentRequired()){if(h===null&&(h=S.createParentElementNode(),c.append(h),$))continue;h!==null&&h.append(S)}else c.append(S),h=null}return c}let vr=null,yr=null,Hr=!1,Eh=!1,Cd=0;const xv={characterData:!0,childList:!0,subtree:!0};function ll(){return Hr||vr!==null&&vr._readOnly}function Or(){if(Hr)throw Error("Cannot use method in read-only mode.")}function Ev(){if(Cd>99)throw Error("One or more transforms are endlessly triggering additional transforms. May have encountered infinite recursion caused by transforms that have their preconditions too lose and/or conflict with each other.")}function ci(){if(vr===null)throw Error("Unable to find an active editor state. State helpers or node methods can only be used synchronously during the callback of editor.update() or editorState.read().");return vr}function $n(){if(yr===null)throw Error("Unable to find an active editor. This method can only be used synchronously during the callback of editor.update().");return yr}function JS(){return yr}function Cv(g,c,h){const E=c.__type,S=yc(g,E);let $=h.get(E);$===void 0&&($=Array.from(S.transforms),h.set(E,$));const K=$.length;for(let G=0;G<K&&($[G](c),!!c.isAttached());G++);}function wv(g,c){return g!==void 0&&g.__key!==c&&g.isAttached()}function XS(g,c){const h=c._dirtyLeaves,E=g._nodeMap;for(const S of h){const $=E.get(S);Tt($)&&$.isAttached()&&$.isSimpleText()&&!$.isUnmergeable()&&Mr($)}}function QS(g,c){const h=c._dirtyLeaves,E=c._dirtyElements,S=g._nodeMap,$=Vr(),K=new Map;let G=h,be=G.size,ye=E,Te=ye.size;for(;be>0||Te>0;){if(be>0){c._dirtyLeaves=new Set;for(const we of G){const Oe=S.get(we);Tt(Oe)&&Oe.isAttached()&&Oe.isSimpleText()&&!Oe.isUnmergeable()&&Mr(Oe),Oe!==void 0&&wv(Oe,$)&&Cv(c,Oe,K),h.add(we)}if(G=c._dirtyLeaves,be=G.size,be>0){Cd++;continue}}c._dirtyLeaves=new Set,c._dirtyElements=new Map;for(const we of ye){const Oe=we[0],Ne=we[1];if(Oe!=="root"&&!Ne)continue;const ze=S.get(Oe);ze!==void 0&&wv(ze,$)&&Cv(c,ze,K),E.set(Oe,Ne)}G=c._dirtyLeaves,be=G.size,ye=c._dirtyElements,Te=ye.size,Cd++}c._dirtyLeaves=h,c._dirtyElements=E}function e1(g){return Ch(g,$n()._nodes)}function Ch(g,c){const h=g.type,E=c.get(h);if(E===void 0)throw Error(`parseEditorState: type "${h}" + not found`);const S=E.klass;if(g.type!==S.getType())throw Error(`LexicalNode: Node ${S.name} does not implement .importJSON().`);const $=S.importJSON(g),K=g.children;if(rt($)&&Array.isArray(K))for(let G=0;G<K.length;G++){const be=K[G],ye=Ch(be,c);$.append(ye)}return $}function t1(g,c,h){const E=Nh(),S=vr,$=Hr,K=yr,G=c._dirtyElements,be=c._dirtyLeaves,ye=c._cloneNotNeeded,Te=c._dirtyType;c._dirtyElements=new Map,c._dirtyLeaves=new Set,c._cloneNotNeeded=new Set,c._dirtyType=0,vr=E,Hr=!1,yr=c;try{const we=c._nodes,Oe=g.root;Ch(Oe,we),h&&h(),E._readOnly=!0,Tv(E)}catch(we){we instanceof Error&&c._onError(we)}finally{c._dirtyElements=G,c._dirtyLeaves=be,c._cloneNotNeeded=ye,c._dirtyType=Te,vr=S,Hr=$,yr=K}return E}function Nv(g,c){const h=vr,E=Hr,S=yr;vr=g,Hr=!0,yr=null;try{return c()}finally{vr=h,Hr=E,yr=S}}function Tv(g){const c=g._nodeMap;c.set=()=>{throw new Error("Cannot call set() on a frozen Lexical node map")},c.clear=()=>{throw new Error("Cannot call clear() on a frozen Lexical node map")},c.delete=()=>{throw new Error("Cannot call delete() on a frozen Lexical node map")}}function hs(g,c){const h=g._pendingEditorState,E=g._rootElement,S=g._headless||E===null;if(h===null)return;const $=g._editorState,K=$._selection,G=h._selection,be=g._dirtyType!==st,ye=vr,Te=Hr,we=yr,Oe=g._updating,Ne=g._observer;let ze=null;if(g._pendingEditorState=null,g._editorState=h,!S&&be&&Ne!==null){yr=g,vr=h,Hr=!1,g._updating=!0;try{const Vt=g._dirtyType,It=g._dirtyElements,Jt=g._dirtyLeaves;Ne.disconnect(),ze=hd($,h,g,Vt,It,Jt)}catch(Vt){if(Vt instanceof Error&&g._onError(Vt),!Eh)Dv(g,null,E,h),xr(g),g._dirtyType=At,Eh=!0,hs(g,$),Eh=!1;else throw Vt;return}finally{Ne.observe(E,xv),g._updating=Oe,vr=ye,Hr=Te,yr=we}}h._readOnly||(h._readOnly=!0,Tv(h),wt(G)&&(Object.freeze(G.anchor),Object.freeze(G.focus)),Object.freeze(G));const Le=g._dirtyLeaves,Je=g._dirtyElements,ft=g._normalizedNodes,Ye=g._updateTags,Pt=g._deferred;be&&(g._dirtyType=st,g._cloneNotNeeded.clear(),g._dirtyLeaves=new Set,g._dirtyElements=new Map,g._normalizedNodes=new Set,g._updateTags=new Set),ud(g,h);const Bt=S?null:Fr(g._window);if(g._editable&&Bt!==null&&(be||G===null||G.dirty)){yr=g,vr=h;try{if(Ne!==null&&Ne.disconnect(),be||G===null||G.dirty){const Vt=g._blockCursorElement;Vt!==null&&ha(Vt,g,E),VS(K,G,g,Bt,Ye,E)}kt(g,E,G),Ne!==null&&Ne.observe(E,xv)}finally{yr=we,vr=ye}}ze!==null&&r1(g,ze,Ye,Le,$),!wt(G)&&G!==null&&(K===null||!K.is(G))&&g.dispatchCommand(t,void 0);const Mt=g._pendingDecorators;Mt!==null&&(g._decorators=Mt,g._pendingDecorators=null,Zc("decorator",g,!0,Mt)),n1(g,c||$,h),Zc("update",g,!0,{dirtyElements:Je,dirtyLeaves:Le,editorState:h,normalizedNodes:ft,prevEditorState:c||$,tags:Ye}),i1(g,Pt),o1(g)}function n1(g,c,h){const E=js(c),S=js(h);E!==S&&Zc("textcontent",g,!0,S)}function r1(g,c,h,E,S){const $=Array.from(g._listeners.mutation),K=$.length;for(let G=0;G<K;G++){const[be,ye]=$[G],Te=c.get(ye);Te!==void 0&&be(Te,{dirtyLeaves:E,prevEditorState:S,updateTags:h})}}function Zc(g,c,h,...E){const S=c._updating;c._updating=h;try{const $=Array.from(c._listeners[g]);for(let K=0;K<$.length;K++)$[K].apply(null,E)}finally{c._updating=S}}function Sv(g,c,h){if(g._updating===!1||yr!==g){let S=!1;return g.update(()=>{S=Sv(g,c,h)}),S}const E=Hs(g);for(let S=4;S>=0;S--)for(let $=0;$<E.length;$++){const K=E[$]._commands.get(c);if(K!==void 0){const G=K[S];if(G!==void 0){const be=Array.from(G),ye=be.length;for(let Te=0;Te<ye;Te++)if(be[Te](h,g)===!0)return!0}}}return!1}function o1(g){const c=g._updates;if(c.length!==0){const h=c.shift();if(h){const[E,S]=h;Av(g,E,S)}}}function i1(g,c){if(g._deferred=[],c.length!==0){const h=g._updating;g._updating=!0;try{for(let E=0;E<c.length;E++)c[E]()}finally{g._updating=h}}}function Ov(g,c){const h=g._updates;let E=c||!1;for(;h.length!==0;){const S=h.shift();if(S){const[$,K]=S;let G,be;K!==void 0&&(G=K.onUpdate,be=K.tag,K.skipTransforms&&(E=!0),G&&g._deferred.push(G),be&&g._updateTags.add(be)),$()}}return E}function Av(g,c,h){const E=g._updateTags;let S,$,K=!1,G=!1;h!==void 0&&(S=h.onUpdate,$=h.tag,$!=null&&E.add($),K=h.skipTransforms||!1,G=h.discrete||!1),S&&g._deferred.push(S);const be=g._editorState;let ye=g._pendingEditorState,Te=!1;(ye===null||ye._readOnly)&&(ye=g._pendingEditorState=l1(ye||be),Te=!0),ye._flushSync=G;const we=vr,Oe=Hr,Ne=yr,ze=g._updating;vr=ye,Hr=!1,g._updating=!0,yr=g;try{Te&&(g._headless?be._selection!=null&&(ye._selection=be._selection.clone()):ye._selection=GS(g));const Le=g._compositionKey;c(),K=Ov(g,K),US(ye,g),g._dirtyType!==st&&(K?XS(ye,g):QS(ye,g),Ov(g),dd(be,ye,g._dirtyLeaves,g._dirtyElements));const Je=g._compositionKey;Le!==Je&&(ye._flushSync=!0);const ft=ye._selection;if(wt(ft)){const Ye=ye._nodeMap,Pt=ft.anchor.key,Bt=ft.focus.key;if(Ye.get(Pt)===void 0||Ye.get(Bt)===void 0)throw Error("updateEditor: selection has been lost because the previously selected nodes have been removed and selection wasn't moved to another node. Ensure selection changes after removing/replacing a selected node.")}else mr(ft)&&ft._nodes.size===0&&(ye._selection=null)}catch(Le){Le instanceof Error&&g._onError(Le),g._pendingEditorState=be,g._dirtyType=At,g._cloneNotNeeded.clear(),g._dirtyLeaves=new Set,g._dirtyElements.clear(),hs(g);return}finally{vr=we,Hr=Oe,yr=Ne,g._updating=ze,Cd=0}g._dirtyType!==st||s1(ye,g)?ye._flushSync?(ye._flushSync=!1,hs(g)):Te&&co(()=>{hs(g)}):(ye._flushSync=!1,Te&&(E.clear(),g._deferred=[],g._pendingEditorState=null))}function Xr(g,c,h){g._updating?g._updates.push([c,h]):Av(g,c,h)}class wh extends Rt{constructor(c){super(c)}decorate(c,h){throw Error("decorate: base method not extended")}isIsolated(){return!1}isInline(){return!0}isKeyboardSelectable(){return!0}}function Wn(g){return g instanceof wh}class ps extends Rt{constructor(c){super(c),this.__first=null,this.__last=null,this.__size=0,this.__format=0,this.__indent=0,this.__dir=null}getFormat(){return this.getLatest().__format}getFormatType(){const c=this.getFormat();return lo[c]||""}getIndent(){return this.getLatest().__indent}getChildren(){const c=[];let h=this.getFirstChild();for(;h!==null;)c.push(h),h=h.getNextSibling();return c}getChildrenKeys(){const c=[];let h=this.getFirstChild();for(;h!==null;)c.push(h.__key),h=h.getNextSibling();return c}getChildrenSize(){return this.getLatest().__size}isEmpty(){return this.getChildrenSize()===0}isDirty(){const c=$n()._dirtyElements;return c!==null&&c.has(this.__key)}isLastChild(){const c=this.getLatest(),h=this.getParentOrThrow().getLastChild();return h!==null&&h.is(c)}getAllTextNodes(){const c=[];let h=this.getFirstChild();for(;h!==null;){if(Tt(h)&&c.push(h),rt(h)){const E=h.getAllTextNodes();c.push(...E)}h=h.getNextSibling()}return c}getFirstDescendant(){let c=this.getFirstChild();for(;c!==null;){if(rt(c)){const h=c.getFirstChild();if(h!==null){c=h;continue}}break}return c}getLastDescendant(){let c=this.getLastChild();for(;c!==null;){if(rt(c)){const h=c.getLastChild();if(h!==null){c=h;continue}}break}return c}getDescendantByIndex(c){const h=this.getChildren(),E=h.length;if(c>=E){const $=h[E-1];return rt($)&&$.getLastDescendant()||$||null}const S=h[c];return rt(S)&&S.getFirstDescendant()||S||null}getFirstChild(){const c=this.getLatest().__first;return c===null?null:Fn(c)}getFirstChildOrThrow(){const c=this.getFirstChild();if(c===null)throw Error(`Expected node ${this.__key} to have a first child.`);return c}getLastChild(){const c=this.getLatest().__last;return c===null?null:Fn(c)}getLastChildOrThrow(){const c=this.getLastChild();if(c===null)throw Error(`Expected node ${this.__key} to have a last child.`);return c}getChildAtIndex(c){const h=this.getChildrenSize();let E,S;if(c<h/2){for(E=this.getFirstChild(),S=0;E!==null&&S<=c;){if(S===c)return E;E=E.getNextSibling(),S++}return null}for(E=this.getLastChild(),S=h-1;E!==null&&S>=c;){if(S===c)return E;E=E.getPreviousSibling(),S--}return null}getTextContent(){let c="";const h=this.getChildren(),E=h.length;for(let S=0;S<E;S++){const $=h[S];c+=$.getTextContent(),rt($)&&S!==E-1&&!$.isInline()&&(c+=qt)}return c}getTextContentSize(){let c=0;const h=this.getChildren(),E=h.length;for(let S=0;S<E;S++){const $=h[S];c+=$.getTextContentSize(),rt($)&&S!==E-1&&!$.isInline()&&(c+=qt.length)}return c}getDirection(){return this.getLatest().__dir}hasFormat(c){if(c!==""){const h=_r[c];return(this.getFormat()&h)!==0}return!1}select(c,h){Or();const E=_n();let S=c,$=h;const K=this.getChildrenSize();if(!this.canBeEmpty()){if(c===0&&h===0){const be=this.getFirstChild();if(Tt(be)||rt(be))return be.select(0,0)}else if((c===void 0||c===K)&&(h===void 0||h===K)){const be=this.getLastChild();if(Tt(be)||rt(be))return be.select()}}S===void 0&&(S=K),$===void 0&&($=K);const G=this.__key;if(wt(E))E.anchor.set(G,S,"element"),E.focus.set(G,$,"element"),E.dirty=!0;else return mv(G,S,G,$,"element","element");return E}selectStart(){const c=this.getFirstDescendant();return c?c.selectStart():this.select()}selectEnd(){const c=this.getLastDescendant();return c?c.selectEnd():this.select()}clear(){const c=this.getWritable();return this.getChildren().forEach(h=>h.remove()),c}append(...c){return this.splice(this.getChildrenSize(),0,c)}setDirection(c){const h=this.getWritable();return h.__dir=c,h}setFormat(c){const h=this.getWritable();return h.__format=c!==""?_r[c]:0,this}setIndent(c){const h=this.getWritable();return h.__indent=c,this}splice(c,h,E){const S=E.length,$=this.getChildrenSize(),K=this.getWritable(),G=K.__key,be=[],ye=[],Te=this.getChildAtIndex(c+h);let we=null,Oe=$-h+S;if(c!==0)if(c===$)we=this.getLastChild();else{const ze=this.getChildAtIndex(c);ze!==null&&(we=ze.getPreviousSibling())}if(h>0){let ze=we===null?this.getFirstChild():we.getNextSibling();for(let Le=0;Le<h;Le++){if(ze===null)throw Error("splice: sibling not found");const Je=ze.getNextSibling(),ft=ze.__key,Ye=ze.getWritable();Ur(Ye),ye.push(ft),ze=Je}}let Ne=we;for(let ze=0;ze<S;ze++){const Le=E[ze];Ne!==null&&Le.is(Ne)&&(we=Ne=Ne.getPreviousSibling());const Je=Le.getWritable();Je.__parent===G&&Oe--,Ur(Je);const ft=Le.__key;if(Ne===null)K.__first=ft,Je.__prev=null;else{const Ye=Ne.getWritable();Ye.__next=ft,Je.__prev=Ye.__key}if(Le.__key===G)throw Error("append: attempting to append self");Je.__parent=G,be.push(ft),Ne=Le}if(c+h===$){if(Ne!==null){const ze=Ne.getWritable();ze.__next=null,K.__last=Ne.__key}}else if(Te!==null){const ze=Te.getWritable();if(Ne!==null){const Le=Ne.getWritable();ze.__prev=Ne.__key,Le.__next=Te.__key}else ze.__prev=null}if(K.__size=Oe,ye.length){const ze=_n();if(wt(ze)){const Le=new Set(ye),Je=new Set(be),{anchor:ft,focus:Ye}=ze;Rv(ft,Le,Je)&&Ed(ft,ft.getNode(),this,we,Te),Rv(Ye,Le,Je)&&Ed(Ye,Ye.getNode(),this,we,Te),Oe===0&&!this.canBeEmpty()&&!nr(this)&&this.remove()}}return K}exportJSON(){return{children:[],direction:this.getDirection(),format:this.getFormatType(),indent:this.getIndent(),type:"element",version:1}}insertNewAfter(c,h){return null}canIndent(){return!0}collapseAtStart(c){return!1}excludeFromCopy(c){return!1}canExtractContents(){return!0}canReplaceWith(c){return!0}canInsertAfter(c){return!0}canBeEmpty(){return!0}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}isInline(){return!1}isShadowRoot(){return!1}canMergeWith(c){return!1}extractWithChild(c,h,E){return!1}}function rt(g){return g instanceof ps}function Rv(g,c,h){let E=g.getNode();for(;E;){const S=E.__key;if(c.has(S)&&!h.has(S))return!0;E=E.getParent()}return!1}class cl extends ps{static getType(){return"root"}static clone(){return new cl}constructor(){super("root"),this.__cachedText=null}getTopLevelElementOrThrow(){throw Error("getTopLevelElementOrThrow: root nodes are not top level elements")}getTextContent(){const c=this.__cachedText;return(ll()||$n()._dirtyType===st)&&c!==null?c:super.getTextContent()}remove(){throw Error("remove: cannot be called on root nodes")}replace(c){throw Error("replace: cannot be called on root nodes")}insertBefore(c){throw Error("insertBefore: cannot be called on root nodes")}insertAfter(c){throw Error("insertAfter: cannot be called on root nodes")}updateDOM(c,h){return!1}append(...c){for(let h=0;h<c.length;h++){const E=c[h];if(!rt(E)&&!Wn(E))throw Error("rootNode.append: Only element or decorator nodes can be appended to the root node")}return super.append(...c)}static importJSON(c){const h=hr();return h.setFormat(c.format),h.setIndent(c.indent),h.setDirection(c.direction),h}exportJSON(){return{children:[],direction:this.getDirection(),format:this.getFormatType(),indent:this.getIndent(),type:"root",version:1}}collapseAtStart(){return!0}}function a1(){return new cl}function Qr(g){return g instanceof cl}function s1(g,c){const h=c.getEditorState()._selection,E=g._selection;if(E!==null){if(E.dirty||!E.is(h))return!0}else if(h!==null)return!0;return!1}function l1(g){return new wd(new Map(g._nodeMap))}function Nh(){return new wd(new Map([["root",a1()]]))}function $v(g){const c=g.exportJSON(),h=g.constructor;if(c.type!==h.getType())throw Error(`LexicalNode: Node ${h.name} does not match the serialized type. Check if .exportJSON() is implemented and it is returning the correct type.`);const E=c.children;if(rt(g)){if(!Array.isArray(E))throw Error(`LexicalNode: Node ${h.name} is an element but .exportJSON() does not have a children array.`);const S=g.getChildren();for(let $=0;$<S.length;$++){const K=S[$],G=$v(K);E.push(G)}}return c}class wd{constructor(c,h){this._nodeMap=c,this._selection=h||null,this._flushSync=!1,this._readOnly=!1}isEmpty(){return this._nodeMap.size===1&&this._selection===null}read(c){return Nv(this,c)}clone(c){const h=new wd(this._nodeMap,c===void 0?this._selection:c);return h._readOnly=!0,h}toJSON(){return Nv(this,()=>({root:$v(hr())}))}}class ul extends ps{static getType(){return"paragraph"}static clone(c){return new ul(c.__key)}createDOM(c){const h=document.createElement("p"),E=$i(c.theme,"paragraph");return E!==void 0&&h.classList.add(...E),h}updateDOM(c,h,E){return!1}static importDOM(){return{p:c=>({conversion:c1,priority:0})}}exportDOM(c){const{element:h}=super.exportDOM(c);if(h&&ni(h)){this.isEmpty()&&h.append(document.createElement("br"));const E=this.getFormatType();h.style.textAlign=E;const S=this.getDirection();S&&(h.dir=S);const $=this.getIndent();$>0&&(h.style.textIndent=`${$*20}px`)}return{element:h}}static importJSON(c){const h=Bi();return h.setFormat(c.format),h.setIndent(c.indent),h.setDirection(c.direction),h}exportJSON(){return{...super.exportJSON(),type:"paragraph",version:1}}insertNewAfter(c,h){const E=Bi(),S=this.getDirection();return E.setDirection(S),this.insertAfter(E,h),E}collapseAtStart(){const c=this.getChildren();if(c.length===0||Tt(c[0])&&c[0].getTextContent().trim()===""){if(this.getNextSibling()!==null)return this.selectNext(),this.remove(),!0;if(this.getPreviousSibling()!==null)return this.selectPrevious(),this.remove(),!0}return!1}}function c1(g){const c=Bi();if(g.style){c.setFormat(g.style.textAlign);const h=parseInt(g.style.textIndent,10)/20;h>0&&c.setIndent(h)}return{node:c}}function Bi(){return fa(new ul)}function u1(g){return g instanceof ul}const d1=0,f1=1,h1=2,p1=3,g1=4;function Dv(g,c,h,E){const S=g._keyToDOMMap;S.clear(),g._editorState=Nh(),g._pendingEditorState=E,g._compositionKey=null,g._dirtyType=st,g._cloneNotNeeded.clear(),g._dirtyLeaves=new Set,g._dirtyElements.clear(),g._normalizedNodes=new Set,g._updateTags=new Set,g._updates=[],g._blockCursorElement=null;const $=g._observer;$!==null&&($.disconnect(),g._observer=null),c!==null&&(c.textContent=""),h!==null&&(h.textContent="",S.set("root",h))}function m1(g,c){const h=new Map,E=new Set,S=$=>{Object.keys($).forEach(K=>{let G=h.get(K);G===void 0&&(G=[],h.set(K,G)),G.push($[K])})};return g.forEach($=>{const K=$.klass.importDOM!=null?$.klass.importDOM.bind($.klass):null;if(K==null||E.has(K))return;E.add(K);const G=K();G!==null&&S(G)}),c&&S(c),h}function v1(g){const c=g||{},h=JS(),E=c.theme||{},S=g===void 0?h:c.parentEditor||null,$=c.disableEvents||!1,K=Nh(),G=c.namespace||(S!==null?S._config.namespace:wc()),be=c.editorState,ye=[cl,ai,Xn,si,ul,...c.nodes||[]],{onError:Te,html:we}=c,Oe=c.editable!==void 0?c.editable:!0;let Ne;if(g===void 0&&h!==null)Ne=h._nodes;else{Ne=new Map;for(let Le=0;Le<ye.length;Le++){let Je=ye[Le],ft=null,Ye=null;if(typeof Je!="function"){const Vt=Je;Je=Vt.replace,ft=Vt.with,Ye=Vt.withKlass||null}{const Vt=Je.name;if(Vt!=="RootNode"){const It=Je.prototype;["getType","clone"].forEach(Jt=>{Je.hasOwnProperty(Jt)||console.warn(`${Vt} must implement static "${Jt}" method`)}),!Je.hasOwnProperty("importDOM")&&Je.hasOwnProperty("exportDOM")&&console.warn(`${Vt} should implement "importDOM" if using a custom "exportDOM" method to ensure HTML serialization (important for copy & paste) works as expected`),It instanceof wh&&(It.hasOwnProperty("decorate")||console.warn(`${It.constructor.name} must implement "decorate" method`)),Je.hasOwnProperty("importJSON")||console.warn(`${Vt} should implement "importJSON" method to ensure JSON and default HTML serialization works as expected`),It.hasOwnProperty("exportJSON")||console.warn(`${Vt} should implement "exportJSON" method to ensure JSON and default HTML serialization works as expected`)}}const Pt=Je.getType(),Bt=Je.transform(),Mt=new Set;Bt!==null&&Mt.add(Bt),Ne.set(Pt,{exportDOM:we&&we.export?we.export.get(Je):void 0,klass:Je,replace:ft,replaceWithKlass:Ye,transforms:Mt})}}const ze=new y1(K,S,Ne,{disableEvents:$,namespace:G,theme:E},Te||console.error,m1(Ne,we?we.import:void 0),Oe);return be!==void 0&&(ze._pendingEditorState=be,ze._dirtyType=At),ze}class y1{constructor(c,h,E,S,$,K,G){this._parentEditor=h,this._rootElement=null,this._editorState=c,this._pendingEditorState=null,this._compositionKey=null,this._deferred=[],this._keyToDOMMap=new Map,this._updates=[],this._updating=!1,this._listeners={decorator:new Set,editable:new Set,mutation:new Map,root:new Set,textcontent:new Set,update:new Set},this._commands=new Map,this._config=S,this._nodes=E,this._decorators={},this._pendingDecorators=null,this._dirtyType=st,this._cloneNotNeeded=new Set,this._dirtyLeaves=new Set,this._dirtyElements=new Map,this._normalizedNodes=new Set,this._updateTags=new Set,this._observer=null,this._key=wc(),this._onError=$,this._htmlConversions=K,this._editable=G,this._headless=h!==null&&h._headless,this._window=null,this._blockCursorElement=null}isComposing(){return this._compositionKey!=null}registerUpdateListener(c){const h=this._listeners.update;return h.add(c),()=>{h.delete(c)}}registerEditableListener(c){const h=this._listeners.editable;return h.add(c),()=>{h.delete(c)}}registerDecoratorListener(c){const h=this._listeners.decorator;return h.add(c),()=>{h.delete(c)}}registerTextContentListener(c){const h=this._listeners.textcontent;return h.add(c),()=>{h.delete(c)}}registerRootListener(c){const h=this._listeners.root;return c(this._rootElement,null),h.add(c),()=>{c(null,this._rootElement),h.delete(c)}}registerCommand(c,h,E){if(E===void 0)throw Error('Listener for type "command" requires a "priority".');const S=this._commands;S.has(c)||S.set(c,[new Set,new Set,new Set,new Set,new Set]);const $=S.get(c);if($===void 0)throw Error(`registerCommand: Command ${String(c)} not found in command map`);const K=$[E];return K.add(h),()=>{K.delete(h),$.every(G=>G.size===0)&&S.delete(c)}}registerMutationListener(c,h){if(this._nodes.get(c.getType())===void 0)throw Error(`Node ${c.name} has not been registered. Ensure node has been passed to createEditor.`);const E=this._listeners.mutation;return E.set(h,c),()=>{E.delete(h)}}registerNodeTransformToKlass(c,h){const E=c.getType(),S=this._nodes.get(E);if(S===void 0)throw Error(`Node ${c.name} has not been registered. Ensure node has been passed to createEditor.`);return S.transforms.add(h),S}registerNodeTransform(c,h){const E=this.registerNodeTransformToKlass(c,h),S=[E],$=E.replaceWithKlass;if($!=null){const K=this.registerNodeTransformToKlass($,h);S.push(K)}return Ua(this,c.getType()),()=>{S.forEach(K=>K.transforms.delete(h))}}hasNode(c){return this._nodes.has(c.getType())}hasNodes(c){return c.every(this.hasNode.bind(this))}dispatchCommand(c,h){return yt(this,c,h)}getDecorators(){return this._decorators}getRootElement(){return this._rootElement}getKey(){return this._key}setRootElement(c){const h=this._rootElement;if(c!==h){const E=$i(this._config.theme,"root"),S=this._pendingEditorState||this._editorState;if(this._rootElement=c,Dv(this,h,c,S),h!==null&&(this._config.disableEvents||Ze(h),E!=null&&h.classList.remove(...E)),c!==null){const $=Nt(c),K=c.style;K.userSelect="text",K.whiteSpace="pre-wrap",K.wordBreak="break-word",c.setAttribute("data-lexical-editor","true"),this._window=$,this._dirtyType=At,xr(this),this._updateTags.add("history-merge"),hs(this),this._config.disableEvents||Ve(c,this),E!=null&&c.classList.add(...E)}else this._editorState=S,this._pendingEditorState=null,this._window=null;Zc("root",this,!1,c,h)}}getElementByKey(c){return this._keyToDOMMap.get(c)||null}getEditorState(){return this._editorState}setEditorState(c,h){if(c.isEmpty())throw Error("setEditorState: the editor state is empty. Ensure the editor state's root node never becomes empty.");mn(this);const E=this._pendingEditorState,S=this._updateTags,$=h!==void 0?h.tag:null;E!==null&&!E.isEmpty()&&($!=null&&S.add($),hs(this)),this._pendingEditorState=c,this._dirtyType=At,this._dirtyElements.set("root",!1),this._compositionKey=null,$!=null&&S.add($),hs(this)}parseEditorState(c,h){const E=typeof c=="string"?JSON.parse(c):c;return t1(E,this,h)}update(c,h){Xr(this,c,h)}focus(c,h={}){const E=this._rootElement;E!==null&&(E.setAttribute("autocapitalize","off"),Xr(this,()=>{const S=_n(),$=hr();S!==null?S.dirty=!0:$.getChildrenSize()!==0&&(h.defaultSelection==="rootStart"?$.selectStart():$.selectEnd())},{onUpdate:()=>{E.removeAttribute("autocapitalize"),c&&c()},tag:"focus"}),this._pendingEditorState===null&&E.removeAttribute("autocapitalize"))}blur(){const c=this._rootElement;c!==null&&c.blur();const h=Fr(this._window);h!==null&&h.removeAllRanges()}isEditable(){return this._editable}setEditable(c){this._editable!==c&&(this._editable=c,Zc("editable",this,!0,c))}toJSON(){return{editorState:this._editorState.toJSON()}}}class Th extends ps{constructor(c,h){super(h),this.__colSpan=c,this.__rowSpan=1}exportJSON(){return{...super.exportJSON(),colSpan:this.__colSpan,rowSpan:this.__rowSpan}}getColSpan(){return this.__colSpan}setColSpan(c){return this.getWritable().__colSpan=c,this}getRowSpan(){return this.__rowSpan}setRowSpan(c){return this.getWritable().__rowSpan=c,this}}function go(g){return g instanceof Th}class Mv extends ps{}function Sh(g){return g instanceof Mv}class kv extends ps{}function Jc(g){return g instanceof kv}return Ge.$INTERNAL_isPointSelection=ir,Ge.$addUpdateTag=mh,Ge.$applyNodeReplacement=fa,Ge.$copyNode=Vs,Ge.$createLineBreakNode=Sr,Ge.$createNodeSelection=bh,Ge.$createParagraphNode=Bi,Ge.$createRangeSelection=zS,Ge.$createTabNode=Na,Ge.$createTextNode=Un,Ge.$getAdjacentNode=da,Ge.$getNearestNodeFromDOMNode=Yr,Ge.$getNearestRootOrShadowRoot=Mc,Ge.$getNodeByKey=Fn,Ge.$getPreviousSelection=sl,Ge.$getRoot=hr,Ge.$getSelection=_n,Ge.$getTextContent=qS,Ge.$hasAncestor=jn,Ge.$hasUpdateTag=ld,Ge.$insertNodes=YS,Ge.$isBlockElementNode=WS,Ge.$isDecoratorNode=Wn,Ge.$isElementNode=rt,Ge.$isInlineElementOrDecoratorNode=Us,Ge.$isLeafNode=Eo,Ge.$isLineBreakNode=Ao,Ge.$isNodeSelection=mr,Ge.$isParagraphNode=u1,Ge.$isRangeSelection=wt,Ge.$isRootNode=Qr,Ge.$isRootOrShadowRoot=nr,Ge.$isTabNode=fs,Ge.$isTextNode=Tt,Ge.$nodesOfType=Dc,Ge.$normalizeSelection__EXPERIMENTAL=aa,Ge.$parseSerializedNode=e1,Ge.$selectAll=Ri,Ge.$setCompositionKey=kn,Ge.$setSelection=pr,Ge.$splitNode=kc,Ge.BLUR_COMMAND=X,Ge.CAN_REDO_COMMAND=w,Ge.CAN_UNDO_COMMAND=T,Ge.CLEAR_EDITOR_COMMAND=Q,Ge.CLEAR_HISTORY_COMMAND=F,Ge.CLICK_COMMAND=n,Ge.COMMAND_PRIORITY_CRITICAL=g1,Ge.COMMAND_PRIORITY_EDITOR=d1,Ge.COMMAND_PRIORITY_HIGH=p1,Ge.COMMAND_PRIORITY_LOW=f1,Ge.COMMAND_PRIORITY_NORMAL=h1,Ge.CONTROLLED_TEXT_INSERTION_COMMAND=a,Ge.COPY_COMMAND=ie,Ge.CUT_COMMAND=H,Ge.DELETE_CHARACTER_COMMAND=r,Ge.DELETE_LINE_COMMAND=m,Ge.DELETE_WORD_COMMAND=p,Ge.DEPRECATED_$computeGridMap=bv,Ge.DEPRECATED_$createGridSelection=KS,Ge.DEPRECATED_$getGridCellNodeRect=Br,Ge.DEPRECATED_$getNodeTriplet=_v,Ge.DEPRECATED_$isGridCellNode=go,Ge.DEPRECATED_$isGridNode=Sh,Ge.DEPRECATED_$isGridRowNode=Jc,Ge.DEPRECATED_$isGridSelection=Pr,Ge.DEPRECATED_GridCellNode=Th,Ge.DEPRECATED_GridNode=Mv,Ge.DEPRECATED_GridRowNode=kv,Ge.DRAGEND_COMMAND=q,Ge.DRAGOVER_COMMAND=B,Ge.DRAGSTART_COMMAND=V,Ge.DROP_COMMAND=te,Ge.DecoratorNode=wh,Ge.ElementNode=ps,Ge.FOCUS_COMMAND=P,Ge.FORMAT_ELEMENT_COMMAND=he,Ge.FORMAT_TEXT_COMMAND=_,Ge.INDENT_CONTENT_COMMAND=fe,Ge.INSERT_LINE_BREAK_COMMAND=o,Ge.INSERT_PARAGRAPH_COMMAND=i,Ge.INSERT_TAB_COMMAND=J,Ge.KEY_ARROW_DOWN_COMMAND=I,Ge.KEY_ARROW_LEFT_COMMAND=R,Ge.KEY_ARROW_RIGHT_COMMAND=y,Ge.KEY_ARROW_UP_COMMAND=k,Ge.KEY_BACKSPACE_COMMAND=ee,Ge.KEY_DELETE_COMMAND=Z,Ge.KEY_DOWN_COMMAND=b,Ge.KEY_ENTER_COMMAND=M,Ge.KEY_ESCAPE_COMMAND=re,Ge.KEY_MODIFIER_COMMAND=ue,Ge.KEY_SPACE_COMMAND=Y,Ge.KEY_TAB_COMMAND=U,Ge.LineBreakNode=Xn,Ge.MOVE_TO_END=N,Ge.MOVE_TO_START=O,Ge.OUTDENT_CONTENT_COMMAND=ge,Ge.PASTE_COMMAND=l,Ge.ParagraphNode=ul,Ge.REDO_COMMAND=C,Ge.REMOVE_TEXT_COMMAND=u,Ge.RootNode=cl,Ge.SELECTION_CHANGE_COMMAND=t,Ge.SELECT_ALL_COMMAND=j,Ge.TabNode=si,Ge.TextNode=ai,Ge.UNDO_COMMAND=v,Ge.createCommand=e,Ge.createEditor=v1,Ge.getNearestEditorFromDOMNode=Ni,Ge.isHTMLAnchorElement=Mi,Ge.isHTMLElement=ni,Ge.isSelectionCapturedInDecoratorInput=bc,Ge.isSelectionWithinEditor=Xo,Ge}var Ue={},ty;function OO(){if(ty)return Ue;ty=1;let e={},t={},n={},r={},o={},i={},a={},l={},u={},p={},m={},_={},v={},C={},b={},y={},N={},R={},O={},k={},I={},M={},Y={},ee={},re={},Z={},U={},J={},fe={},ge={},te={},he={},V={},B={},q={},ie={};function H(f){let s=new URLSearchParams;s.append("code",f);for(let d=1;d<arguments.length;d++)s.append("v",arguments[d]);throw Error(`Minified Lexical error #${f}; visit https://lexical.dev/docs/error?${s} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}let j=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Q=j&&"documentMode"in document?document.documentMode:null,F=j&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),w=j&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),T=j&&"InputEvent"in window&&!Q?"getTargetRanges"in new window.InputEvent("input"):!1,P=j&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),X=j&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,ue=j&&/Android/.test(navigator.userAgent),pe=j&&/^(?=.*Chrome).*/i.test(navigator.userAgent),se=j&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&!pe,Ce=P||X||se?" ":"",Se=w?" ":Ce,He=/^[^A-Za-z\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u02b8\u0300-\u0590\u0800-\u1fff\u200e\u2c00-\ufb1c\ufe00-\ufe6f\ufefd-\uffff]*[\u0591-\u07ff\ufb1d-\ufdfd\ufe70-\ufefc]/,le=/^[^\u0591-\u07ff\ufb1d-\ufdfd\ufe70-\ufefc]*[A-Za-z\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u02b8\u0300-\u0590\u0800-\u1fff\u200e\u2c00-\ufb1c\ufe00-\ufe6f\ufefd-\uffff]/,ce={bold:1,code:16,highlight:128,italic:2,strikethrough:4,subscript:32,superscript:64,underline:8},ve={directionless:1,unmergeable:2},ke={center:2,end:6,justify:4,left:1,right:3,start:5},Pe={2:"center",6:"end",4:"justify",1:"left",3:"right",5:"start"},Fe={normal:0,segmented:2,token:1},Qe={0:"normal",2:"segmented",1:"token"},st=!1,dt=0;function At(f){dt=f.timeStamp}function Ae(f,s,d){return s.__lexicalLineBreak===f||f[`__lexicalKey_${d._key}`]!==void 0}function me(f){return f.getEditorState().read(()=>{let s=hn();return s!==null?s.clone():null})}function _e(f,s,d){st=!0;let x=100<performance.now()-dt;try{kr(f,()=>{let A=hn()||me(f);var D=new Map,W=f.getRootElement(),oe=f._editorState,xe=f._blockCursorElement;let Re=!1,Ve="";for(var Ze=0;Ze<s.length;Ze++){var Ke=s[Ze],Ie=Ke.type,it=Ke.target,bt=Cr(it,oe);if(!(bt===null&&it!==W||on(bt))){if(Ie==="characterData"){if(Ke=x&&Nt(bt))e:{Ke=A,Ie=it;var Rt=bt;if(kt(Ke)){var zt=Ke.anchor.getNode();if(zt.is(Rt)&&Ke.format!==zt.getFormat()){Ke=!1;break e}}Ke=Ie.nodeType===3&&Rt.isAttached()}Ke&&(Rt=co(f._window),Ie=Ke=null,Rt!==null&&Rt.anchorNode===it&&(Ke=Rt.anchorOffset,Ie=Rt.focusOffset),it=it.nodeValue,it!==null&&Be(bt,it,Ke,Ie,!1))}else if(Ie==="childList"){for(Re=!0,Ie=Ke.addedNodes,Rt=0;Rt<Ie.length;Rt++){zt=Ie[Rt];var Rn=dr(zt),Xn=zt.parentNode;Xn==null||zt===xe||Rn!==null||zt.nodeName==="BR"&&Ae(zt,Xn,f)||(w&&(Rn=zt.innerText||zt.nodeValue)&&(Ve+=Rn),Xn.removeChild(zt))}if(Ke=Ke.removedNodes,Ie=Ke.length,0<Ie){for(Rt=0,zt=0;zt<Ie;zt++)Xn=Ke[zt],(Xn.nodeName==="BR"&&Ae(Xn,it,f)||xe===Xn)&&(it.appendChild(Xn),Rt++);Ie!==Rt&&(it===W&&(bt=oe._nodeMap.get("root")),D.set(it,bt))}}}}if(0<D.size)for(let[us,Sr]of D)if(nt(Sr))for(D=Sr.getChildrenKeys(),W=us.firstChild,oe=0;oe<D.length;oe++)xe=f.getElementByKey(D[oe]),xe!==null&&(W==null?(us.appendChild(xe),W=xe):W!==xe&&us.replaceChild(xe,W),W=W.nextSibling);else Nt(Sr)&&Sr.markDirty();if(D=d.takeRecords(),0<D.length){for(W=0;W<D.length;W++)for(xe=D[W],oe=xe.addedNodes,xe=xe.target,Ze=0;Ze<oe.length;Ze++)bt=oe[Ze],it=bt.parentNode,it==null||bt.nodeName!=="BR"||Ae(bt,xe,f)||it.removeChild(bt);d.takeRecords()}A!==null&&(Re&&(A.dirty=!0,_r(A)),w&&Wt(f)&&A.insertRawText(Ve))})}finally{st=!1}}function De(f){let s=f._observer;if(s!==null){let d=s.takeRecords();_e(f,d,s)}}function je(f){dt===0&&wn(f).addEventListener("textInput",At,!0),f._observer=new MutationObserver((s,d)=>{_e(f,s,d)})}function Me(f,s){let d=f.__mode,x=f.__format;f=f.__style;let A=s.__mode,D=s.__format;return s=s.__style,(d===null||d===A)&&(x===null||x===D)&&(f===null||f===s)}function We(f,s){let d=f.mergeWithSibling(s),x=bn()._normalizedNodes;return x.add(f.__key),x.add(s.__key),d}function tt(f){if(f.__text===""&&f.isSimpleText()&&!f.isUnmergeable())f.remove();else{for(var s;(s=f.getPreviousSibling())!==null&&Nt(s)&&s.isSimpleText()&&!s.isUnmergeable();)if(s.__text==="")s.remove();else{Me(s,f)&&(f=We(s,f));break}for(var d;(d=f.getNextSibling())!==null&&Nt(d)&&d.isSimpleText()&&!d.isUnmergeable();)if(d.__text==="")d.remove();else{Me(f,d)&&We(f,d);break}}}function ht(f){return Et(f.anchor),Et(f.focus),f}function Et(f){for(;f.type==="element";){var s=f.getNode(),d=f.offset;if(d===s.getChildrenSize()?(s=s.getChildAtIndex(d-1),d=!0):(s=s.getChildAtIndex(d),d=!1),Nt(s)){f.set(s.__key,d?s.getTextContentSize():0,"text");break}else if(!nt(s))break;f.set(s.__key,d?s.getChildrenSize():0,"element")}}let Lt=1,Xe=typeof queueMicrotask=="function"?queueMicrotask:f=>{Promise.resolve().then(f)};function qe(f){let s=document.activeElement;if(s===null)return!1;let d=s.nodeName;return on(Cr(f))&&(d==="INPUT"||d==="TEXTAREA"||s.contentEditable==="true"&&s.__lexicalEditor==null)}function lt(f,s,d){let x=f.getRootElement();try{return x!==null&&x.contains(s)&&x.contains(d)&&s!==null&&!qe(s)&&et(s)===f}catch{return!1}}function et(f){for(;f!=null;){let s=f.__lexicalEditor;if(s!=null)return s;f=mn(f)}return null}function ot(f){return f.isToken()||f.isSegmented()}function ct(f){for(;f!=null;){if(f.nodeType===3)return f;f=f.firstChild}return null}function pt(f,s,d){let x=ce[s];return d!==null&&(f&x)===(d&x)||(f^=x,s==="subscript"?f&=~ce.superscript:s==="superscript"&&(f&=~ce.subscript)),f}function Ct(f,s){if(s!=null)f.__key=s;else{rr(),99<ma&&H(14),s=bn();var d=qr(),x=""+Lt++;d._nodeMap.set(x,f),nt(f)?s._dirtyElements.set(x,!0):s._dirtyLeaves.add(x),s._cloneNotNeeded.add(x),s._dirtyType=1,f.__key=x}}function $t(f){var s=f.getParent();if(s!==null){let A=f.getWritable();s=s.getWritable();var d=f.getPreviousSibling();if(f=f.getNextSibling(),d===null)if(f!==null){var x=f.getWritable();s.__first=f.__key,x.__prev=null}else s.__first=null;else{if(x=d.getWritable(),f!==null){let D=f.getWritable();D.__prev=x.__key,x.__next=D.__key}else x.__next=null;A.__prev=null}f===null?d!==null?(f=d.getWritable(),s.__last=d.__key,f.__next=null):s.__last=null:(f=f.getWritable(),d!==null?(d=d.getWritable(),d.__next=f.__key,f.__prev=d.__key):f.__prev=null,A.__next=null),s.__size--,A.__parent=null}}function Yt(f){99<ma&&H(14);var s=f.getLatest(),d=s.__parent,x=qr();let A=bn(),D=x._nodeMap;if(x=A._dirtyElements,d!==null)e:for(;d!==null;){if(x.has(d))break e;let W=D.get(d);if(W===void 0)break;x.set(d,!1),d=W.__parent}s=s.__key,A._dirtyType=1,nt(f)?x.set(s,!0):A._dirtyLeaves.add(s)}function Kt(f){rr();var s=bn();let d=s._compositionKey;f!==d&&(s._compositionKey=f,d!==null&&(s=fn(d),s!==null&&s.getWritable()),f!==null&&(f=fn(f),f!==null&&f.getWritable()))}function qt(){return va()?null:bn()._compositionKey}function fn(f,s){return f=(s||qr())._nodeMap.get(f),f===void 0?null:f}function dr(f,s){let d=bn();return f=f[`__lexicalKey_${d._key}`],f!==void 0?fn(f,s):null}function Cr(f,s){for(;f!=null;){let d=dr(f,s);if(d!==null)return d;f=mn(f)}return null}function Zo(f){let s=Object.assign({},f._decorators);return f._pendingDecorators=s}function oa(f){return f.read(()=>Zn().getTextContent())}function wr(f,s){kr(f,()=>{var d=qr();if(!d.isEmpty())if(s==="root")Zn().markDirty();else{d=d._nodeMap;for(let[,x]of d)x.markDirty()}},f._pendingEditorState===null?{tag:"history-merge"}:void 0)}function Zn(){return qr()._nodeMap.get("root")}function _r(f){rr();let s=qr();f!==null&&(f.dirty=!0,f.setCachedNodes(null)),s._selection=f}function lo(f){var s=bn(),d;e:{for(d=f;d!=null;){let x=d[`__lexicalKey_${s._key}`];if(x!==void 0){d=x;break e}d=mn(d)}d=null}return d===null?(s=s.getRootElement(),f===s?fn("root"):null):fn(d)}function ia(f){return/[\uD800-\uDBFF][\uDC00-\uDFFF]/g.test(f)}function Ee(f){let s=[];for(;f!==null;)s.push(f),f=f._parentEditor;return s}function ae(){return Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,5)}function $e(f,s,d){if(s=co(s._window),s!==null){var x=s.anchorNode,{anchorOffset:A,focusOffset:D}=s;if(x!==null&&(s=x.nodeType===3?x.nodeValue:null,x=Cr(x),s!==null&&Nt(x))){if(s===Ce&&d){let W=d.length;s=d,D=A=W}s!==null&&Be(x,s,A,D,f)}}}function Be(f,s,d,x,A){let D=f;if(D.isAttached()&&(A||!D.isDirty())){let Re=D.isComposing(),Ve=s;if((Re||A)&&s[s.length-1]===Ce&&(Ve=s.slice(0,-1)),s=D.getTextContent(),A||Ve!==s)if(Ve==="")if(Kt(null),P||X||se)D.remove();else{let Ze=bn();setTimeout(()=>{Ze.update(()=>{D.isAttached()&&D.remove()})},20)}else{A=D.getParent(),s=ri();var W=D.getTextContentSize(),oe=qt(),xe=D.getKey();D.isToken()||oe!==null&&xe===oe&&!Re||kt(s)&&(A!==null&&!A.canInsertTextBefore()&&s.anchor.offset===0||s.anchor.key===f.__key&&s.anchor.offset===0&&!D.canInsertTextBefore()||s.focus.key===f.__key&&s.focus.offset===W&&!D.canInsertTextAfter())?D.markDirty():(f=hn(),kt(f)&&d!==null&&x!==null&&(f.setTextNodeRange(D,d,D,x),D.isSegmented()&&(d=D.getTextContent(),d=jn(d),D.replace(d),D=d)),D.setTextContent(Ve))}}}function at(f,s){if(s.isSegmented())return!0;if(!f.isCollapsed())return!1;f=f.anchor.offset;let d=s.getParentOrThrow(),x=s.isToken();return f===0?((f=!s.canInsertTextBefore()||!d.canInsertTextBefore()||x)||(s=s.getPreviousSibling(),f=(Nt(s)||nt(s)&&s.isInline())&&!s.canInsertTextAfter()),f):f===s.getTextContentSize()?!s.canInsertTextAfter()||!d.canInsertTextAfter()||x:!1}function xt(f,s){f.__lexicalClassNameCache===void 0&&(f.__lexicalClassNameCache={});let d=f.__lexicalClassNameCache,x=d[s];return x!==void 0?x:(f=f[s],typeof f=="string"?(f=f.split(" "),d[s]=f):f)}function _t(f,s,d,x,A){d.size!==0&&(d=x.__type,x=x.__key,s=s.get(d),s===void 0&&H(33,d),d=s.klass,s=f.get(d),s===void 0&&(s=new Map,f.set(d,s)),f=s.get(x),d=f==="destroyed"&&A==="created",(f===void 0||d)&&s.set(x,d?"updated":A))}function gt(f,s,d){let x=f.getParent(),A=d;return x!==null&&(s&&d===0?(A=f.getIndexWithinParent(),f=x):s||d!==f.getChildrenSize()||(A=f.getIndexWithinParent()+1,f=x)),f.getChildAtIndex(s?A-1:A)}function Ot(f,s){var d=f.offset;return f.type==="element"?(f=f.getNode(),gt(f,s,d)):(f=f.getNode(),s&&d===0||!s&&d===f.getTextContentSize()?(d=s?f.getPreviousSibling():f.getNextSibling(),d===null?gt(f.getParentOrThrow(),s,f.getIndexWithinParent()+(s?0:1)):d):null)}function Wt(f){return f=(f=wn(f).event)&&f.inputType,f==="insertFromPaste"||f==="insertFromPasteAsQuotation"}function Dt(f){return!Tr(f)&&!f.isLastChild()&&!f.isInline()}function Gt(f,s){return f=f._keyToDOMMap.get(s),f===void 0&&H(75,s),f}function mn(f){return f=f.assignedSlot||f.parentElement,f!==null&&f.nodeType===11?f.host:f}function xr(f,s){for(f=f.getParent();f!==null;){if(f.is(s))return!0;f=f.getParent()}return!1}function wn(f){return f=f._window,f===null&&H(78),f}function Jn(f){for(f=f.getParentOrThrow();f!==null&&!Mr(f);)f=f.getParentOrThrow();return f}function Mr(f){return Tr(f)||nt(f)&&f.isShadowRoot()}function aa(f){return f=f.constructor.clone(f),Ct(f,null),f}function Jo(f){var s=bn();let d=f.constructor.getType();return s=s._nodes.get(d),s===void 0&&H(97),s=s.replace,s!==null?(s=s(f),s instanceof f.constructor||H(98),s):f}function mc(f,s){f=f.getParent(),!Tr(f)||nt(s)||on(s)||H(99)}function vc(f){return(on(f)||nt(f)&&!f.canBeEmpty())&&!f.isInline()}function yc(f,s,d){d.style.removeProperty("caret-color"),s._blockCursorElement=null,s=f.parentElement,s!==null&&s.removeChild(f)}function co(f){return j?(f||window).getSelection():null}function Is(f,s){for(;f!==Zn()&&f!=null;){if(s(f))return f;f=f.getParent()}return null}function bc(f){let s=[],d=[f];for(;0<d.length;){let x=d.pop();x===void 0&&H(112),nt(x)&&d.unshift(...x.getChildren()),x!==f&&s.push(x)}return s}function Xo(f){return f.nodeType===1}function Ni(f){if(on(f)&&!f.isInline())return!0;if(!nt(f)||Mr(f))return!1;var s=f.getFirstChild();return s=s===null||Ri(s)||Nt(s)||s.isInline(),!f.isInline()&&f.canBeEmpty()!==!1&&s}function _c(f,s){for(;f!==null&&f.getParent()!==null&&!s(f);)f=f.getParentOrThrow();return s(f)?f:null}function Ls(f,s,d,x,A,D){for(f=f.getFirstChild();f!==null;){let W=f.__key;f.__parent===s&&(nt(f)&&Ls(f,W,d,x,A,D),d.has(W)||D.delete(W),A.push(W)),f=f.getNextSibling()}}function ah(f,s,d,x){f=f._nodeMap,s=s._nodeMap;let A=[];for(let[D]of x){let W=s.get(D);W===void 0||W.isAttached()||(nt(W)&&Ls(W,D,f,s,A,x),f.has(D)||x.delete(D),A.push(D))}for(let D of A)s.delete(D);for(let D of d)x=s.get(D),x===void 0||x.isAttached()||(f.has(D)||d.delete(D),s.delete(D))}let An="",tr="",Eo="",Co,fr,Ur,Ga=!1,xc=!1,kn,Vr=null,Fn,Fs,Yr,wo,js,Ua;function hr(f,s){let d=Yr.get(f);if(s!==null){let x=Tc(f);x.parentNode===s&&s.removeChild(x)}wo.has(f)||fr._keyToDOMMap.delete(f),nt(d)&&(f=Ya(d,Yr),Bs(f,0,f.length-1,null)),d!==void 0&&_t(Ua,Ur,kn,d,"destroyed")}function Bs(f,s,d,x){for(;s<=d;++s){let A=f[s];A!==void 0&&hr(A,x)}}function pr(f,s){f.setProperty("text-align",s)}function Xu(f,s){var d=Co.theme.indent;if(typeof d=="string"){let x=f.classList.contains(d);0<s&&!x?f.classList.add(d):1>s&&x&&f.classList.remove(d)}d=getComputedStyle(f).getPropertyValue("--lexical-indent-base-value")||"40px",f.style.setProperty("padding-inline-start",s===0?"":`calc(${s} * ${d})`)}function Ti(f,s){f=f.style,s===0?pr(f,""):s===1?pr(f,"left"):s===2?pr(f,"center"):s===3?pr(f,"right"):s===4?pr(f,"justify"):s===5?pr(f,"start"):s===6&&pr(f,"end")}function Va(f,s,d){let x=wo.get(f);x===void 0&&H(60);let A=x.createDOM(Co,fr);var D=fr._keyToDOMMap;if(A["__lexicalKey_"+fr._key]=f,D.set(f,A),Nt(x)?A.setAttribute("data-lexical-text","true"):on(x)&&A.setAttribute("data-lexical-decorator","true"),nt(x)){if(f=x.__indent,D=x.__size,f!==0&&Xu(A,f),D!==0){--D,f=Ya(x,wo);var W=tr;tr="",Ec(f,x,0,D,A,null),wc(x,A),tr=W}f=x.__format,f!==0&&Ti(A,f),x.isInline()||Hs(null,x,A),Dt(x)&&(An+=`
|
|
69
|
-
|
|
70
|
-
`,Eo+=`
|
|
71
|
-
|
|
72
|
-
`)}else D=x.getTextContent(),on(x)?(W=x.decorate(fr,Co),W!==null&&Ws(f,W),A.contentEditable="false"):Nt(x)&&(x.isDirectionless()||(tr+=D)),An+=D,Eo+=D;return s!==null&&(d!=null?s.insertBefore(A,d):(d=s.__lexicalLineBreak,d!=null?s.insertBefore(A,d):s.appendChild(A))),_t(Ua,Ur,kn,x,"created"),A}function Ec(f,s,d,x,A,D){let W=An;for(An="";d<=x;++d)Va(f[d],A,D);Dt(s)&&(An+=`
|
|
73
|
-
|
|
74
|
-
`),A.__lexicalTextContent=An,An=W+An}function Cc(f,s){return f=s.get(f),Ri(f)||on(f)&&f.isInline()}function Hs(f,s,d){f=f!==null&&(f.__size===0||Cc(f.__last,Yr)),s=s.__size===0||Cc(s.__last,wo),f?s||(s=d.__lexicalLineBreak,s!=null&&d.removeChild(s),d.__lexicalLineBreak=null):s&&(s=document.createElement("br"),d.__lexicalLineBreak=s,d.appendChild(s))}function wc(f,s){var d=s.__lexicalDir;if(s.__lexicalDirTextContent!==tr||d!==Vr){let D=tr==="";if(D)var x=Vr;else x=tr,x=He.test(x)?"rtl":le.test(x)?"ltr":null;if(x!==d){let W=s.classList,oe=Co.theme;var A=d!==null?oe[d]:void 0;let xe=x!==null?oe[x]:void 0;A!==void 0&&(typeof A=="string"&&(A=A.split(" "),A=oe[d]=A),W.remove(...A)),x===null||D&&x==="ltr"?s.removeAttribute("dir"):(xe!==void 0&&(typeof xe=="string"&&(d=xe.split(" "),xe=oe[x]=d),xe!==void 0&&W.add(...xe)),s.dir=x),xc||(f.getWritable().__dir=x)}Vr=x,s.__lexicalDirTextContent=tr,s.__lexicalDir=x}}function Ya(f,s){let d=[];for(f=f.__first;f!==null;){let x=s.get(f);x===void 0&&H(101),d.push(f),f=x.__next}return d}function Si(f,s){var d=Yr.get(f),x=wo.get(f);d!==void 0&&x!==void 0||H(61);var A=Ga||Fs.has(f)||Fn.has(f);let D=Gt(fr,f);if(d===x&&!A)return nt(d)?(x=D.__lexicalTextContent,x!==void 0&&(An+=x,Eo+=x),x=D.__lexicalDirTextContent,x!==void 0&&(tr+=x)):(x=d.getTextContent(),Nt(d)&&!d.isDirectionless()&&(tr+=x),Eo+=x,An+=x),D;if(d!==x&&A&&_t(Ua,Ur,kn,x,"updated"),x.updateDOM(d,D,Co))return x=Va(f,null,null),s===null&&H(62),s.replaceChild(x,D),hr(f,null),x;if(nt(d)&&nt(x)){if(f=x.__indent,f!==d.__indent&&Xu(D,f),f=x.__format,f!==d.__format&&Ti(D,f),A){f=x,A=tr,tr="",s=An;var W=d.__size,oe=f.__size;if(An="",W===1&&oe===1){var xe=d.__first,Re=f.__first;if(xe===Re)Si(xe,D);else{var Ve=Tc(xe);Re=Va(Re,null,null),D.replaceChild(Re,Ve),hr(xe,null)}}else{Re=Ya(d,Yr);var Ze=Ya(f,wo);if(W===0)oe!==0&&Ec(Ze,f,0,oe-1,D,null);else if(oe===0)W!==0&&(xe=D.__lexicalLineBreak==null,Bs(Re,0,W-1,xe?null:D),xe&&(D.textContent=""));else{var Ke=Re;Re=Ze,Ze=W-1,W=oe-1;let it=D.firstChild,bt=0;for(oe=0;bt<=Ze&&oe<=W;){var Ie=Ke[bt];let Rt=Re[oe];if(Ie===Rt)it=Nc(Si(Rt,D)),bt++,oe++;else{xe===void 0&&(xe=new Set(Ke)),Ve===void 0&&(Ve=new Set(Re));let zt=Ve.has(Ie),Rn=xe.has(Rt);zt?(Rn?(Ie=Gt(fr,Rt),Ie===it?it=Nc(Si(Rt,D)):(it!=null?D.insertBefore(Ie,it):D.appendChild(Ie),Si(Rt,D)),bt++):Va(Rt,D,it),oe++):(it=Nc(Tc(Ie)),hr(Ie,D),bt++)}}xe=bt>Ze,Ve=oe>W,xe&&!Ve?(xe=Re[W+1],xe=xe===void 0?null:fr.getElementByKey(xe),Ec(Re,f,oe,W,D,xe)):Ve&&!xe&&Bs(Ke,bt,Ze,D)}}Dt(f)&&(An+=`
|
|
75
|
-
|
|
76
|
-
`),D.__lexicalTextContent=An,An=s+An,wc(f,D),tr=A,Tr(x)||x.isInline()||Hs(d,x,D)}Dt(x)&&(An+=`
|
|
77
|
-
|
|
78
|
-
`,Eo+=`
|
|
79
|
-
|
|
80
|
-
`)}else d=x.getTextContent(),on(x)?(A=x.decorate(fr,Co),A!==null&&Ws(f,A)):Nt(x)&&!x.isDirectionless()&&(tr+=d),An+=d,Eo+=d;return!xc&&Tr(x)&&x.__cachedText!==Eo&&(x=x.getWritable(),x.__cachedText=Eo),D}function Ws(f,s){let d=fr._pendingDecorators,x=fr._decorators;if(d===null){if(x[f]===s)return;d=Zo(fr)}d[f]=s}function Nc(f){return f=f.nextSibling,f!==null&&f===fr._blockCursorElement&&(f=f.nextSibling),f}function Tc(f){let s=js.get(f);return s===void 0&&H(75,f),s}let No=Object.freeze({}),Sc=[["keydown",hh],["pointerdown",lh],["compositionstart",dh],["compositionend",fh],["input",uh],["click",sh],["cut",No],["copy",No],["dragstart",No],["dragover",No],["dragend",No],["paste",No],["focus",No],["blur",No],["drop",No]];T&&Sc.push(["beforeinput",(f,s)=>ch(f,s)]);let qa=0,Qu=0,ed=0,sa=null,Za=0,Oc=!1,Ac=!1,Ja=!1,Xa=!1,td=[0,"",0,"root",0];function nd(f,s,d,x,A){let D=f.anchor,W=f.focus,oe=D.getNode();var xe=bn();let Re=co(xe._window),Ve=Re!==null?Re.anchorNode:null,Ze=D.key;xe=xe.getElementByKey(Ze);let Ke=d.length;return Ze!==W.key||!Nt(oe)||(!A&&(!T||ed<x+50)||oe.isDirty()&&2>Ke||ia(d))&&D.offset!==W.offset&&!oe.isComposing()||ot(oe)||oe.isDirty()&&1<Ke||(A||!T)&&xe!==null&&!oe.isComposing()&&Ve!==ct(xe)||Re!==null&&s!==null&&(!s.collapsed||s.startContainer!==Re.anchorNode||s.startOffset!==Re.anchorOffset)||oe.getFormat()!==f.format||oe.getStyle()!==f.style||at(f,oe)}function rd(f,s){return f!==null&&f.nodeValue!==null&&f.nodeType===3&&s!==0&&s!==f.nodeValue.length}function od(f,s,d){let{anchorNode:x,anchorOffset:A,focusNode:D,focusOffset:W}=f;Oc&&(Oc=!1,rd(x,A)&&rd(D,W))||kr(s,()=>{if(!d)_r(null);else if(lt(s,x,D)){var oe=hn();if(kt(oe)){var xe=oe.anchor,Re=xe.getNode();if(oe.isCollapsed()){f.type==="Range"&&f.anchorNode===f.focusNode&&(oe.dirty=!0);var Ve=wn(s).event;Ve=Ve?Ve.timeStamp:performance.now();let[Ke,Ie,it,bt,Rt]=td;var Ze=Zn();Ze=s.isComposing()===!1&&Ze.getTextContent()==="",Ve<Rt+200&&xe.offset===it&&xe.key===bt?(oe.format=Ke,oe.style=Ie):xe.type==="text"?(oe.format=Re.getFormat(),oe.style=Re.getStyle()):xe.type!=="element"||Ze||(oe.format=0,oe.style="")}else{xe=255,Re=!1,Ve=oe.getNodes(),Ze=Ve.length;for(let Ke=0;Ke<Ze;Ke++){let Ie=Ve[Ke];if(Nt(Ie)&&(Re=!0,xe&=Ie.getFormat(),xe===0))break}oe.format=Re?xe:0}}mt(s,e,void 0)}})}function sh(f,s){kr(s,()=>{let d=hn();var x=co(s._window);let A=ri();if(x)if(kt(d)){let W=d.anchor;var D=W.getNode();W.type==="element"&&W.offset===0&&d.isCollapsed()&&!Tr(D)&&Zn().getChildrenSize()===1&&D.getTopLevelElementOrThrow().isEmpty()&&A!==null&&d.is(A)?(x.removeAllRanges(),d.dirty=!0):f.detail!==3||d.isCollapsed()||(x=d.focus.getNode(),D!==x&&(nt(D)?D.select(0):D.getParentOrThrow().select(0)))}else f.pointerType==="touch"&&(D=x.anchorNode,D!==null&&(D=D.nodeType,D===1||D===3))&&(x=ki(A,x,s),_r(x));mt(s,t,f)})}function lh(f,s){let d=f.target;f=f.pointerType,d instanceof Node&&f!=="touch"&&kr(s,()=>{on(Cr(d))||(Ac=!0)})}function Rc(f){return f.getTargetRanges?(f=f.getTargetRanges(),f.length===0?null:f[0]):null}function id(f,s){return f!==s||nt(f)||nt(s)||!f.isToken()||!s.isToken()}function ch(f,s){let d=f.inputType,x=Rc(f);d==="deleteCompositionText"||w&&Wt(s)||d!=="insertCompositionText"&&kr(s,()=>{let A=hn();if(d==="deleteContentBackward"){if(A===null){var D=ri();if(!kt(D))return;_r(D.clone())}if(kt(A)){ue&&Kt(A.anchor.key),Qu===229&&f.timeStamp<qa+30&&s.isComposing()&&A.anchor.key===A.focus.key?(Kt(null),qa=0,setTimeout(()=>{kr(s,()=>{Kt(null)})},30),kt(A)&&(D=A.anchor.getNode(),D.markDirty(),A.format=D.getFormat(),A.style=D.getStyle()),1>=A.anchor.getNode().getTextContent().length&&(f.preventDefault(),mt(s,n,!0))):(f.preventDefault(),mt(s,n,!0));return}}if(kt(A)){D=f.data,sa!==null&&$e(!1,s,sa),A.dirty&&sa===null||!A.isCollapsed()||Tr(A.anchor.getNode())||x===null||A.applyDOMRange(x),sa=null;var W=A.focus,oe=A.anchor.getNode();if(W=W.getNode(),d==="insertText"||d==="insertTranspose")D===`
|
|
81
|
-
`?(f.preventDefault(),mt(s,r,!1)):D===`
|
|
82
|
-
|
|
83
|
-
`?(f.preventDefault(),mt(s,o,void 0)):D==null&&f.dataTransfer?(D=f.dataTransfer.getData("text/plain"),f.preventDefault(),A.insertRawText(D)):D!=null&&nd(A,x,D,f.timeStamp,!0)?(f.preventDefault(),mt(s,i,D)):sa=D,ed=f.timeStamp;else switch(f.preventDefault(),d){case"insertFromYank":case"insertFromDrop":case"insertReplacementText":mt(s,i,f);break;case"insertFromComposition":Kt(null),mt(s,i,f);break;case"insertLineBreak":Kt(null),mt(s,r,!1);break;case"insertParagraph":Kt(null),Ja&&!X?(Ja=!1,mt(s,r,!1)):mt(s,o,void 0);break;case"insertFromPaste":case"insertFromPasteAsQuotation":mt(s,a,f);break;case"deleteByComposition":id(oe,W)&&mt(s,l,f);break;case"deleteByDrag":case"deleteByCut":mt(s,l,f);break;case"deleteContent":mt(s,n,!1);break;case"deleteWordBackward":mt(s,u,!0);break;case"deleteWordForward":mt(s,u,!1);break;case"deleteHardLineBackward":case"deleteSoftLineBackward":mt(s,p,!0);break;case"deleteContentForward":case"deleteHardLineForward":case"deleteSoftLineForward":mt(s,p,!1);break;case"formatStrikeThrough":mt(s,m,"strikethrough");break;case"formatBold":mt(s,m,"bold");break;case"formatItalic":mt(s,m,"italic");break;case"formatUnderline":mt(s,m,"underline");break;case"historyUndo":mt(s,_,void 0);break;case"historyRedo":mt(s,v,void 0)}}})}function uh(f,s){f.stopPropagation(),kr(s,()=>{var d=hn(),x=f.data,A=Rc(f);if(x!=null&&kt(d)&&nd(d,A,x,f.timeStamp,!1)){Xa&&($c(s,x),Xa=!1);var D=d.anchor,W=D.getNode();if(A=co(s._window),A===null)return;let oe=D.offset;(D=T&&!d.isCollapsed()&&Nt(W)&&A.anchorNode!==null)&&(W=W.getTextContent().slice(0,oe)+x+W.getTextContent().slice(oe+d.focus.offset),A=A.anchorNode,D=W===(A.nodeType===3?A.nodeValue:null)),D||mt(s,i,x),x=x.length,w&&1<x&&f.inputType==="insertCompositionText"&&!s.isComposing()&&(d.anchor.offset-=x),P||X||se||!s.isComposing()||(qa=0,Kt(null))}else $e(!1,s,x!==null?x:void 0),Xa&&($c(s,x||void 0),Xa=!1);rr(),d=bn(),De(d)}),sa=null}function dh(f,s){kr(s,()=>{let d=hn();if(kt(d)&&!s.isComposing()){let x=d.anchor,A=d.anchor.getNode();Kt(x.key),(f.timeStamp<qa+30||x.type==="element"||!d.isCollapsed()||A.getFormat()!==d.format||A.getStyle()!==d.style)&&mt(s,i,Se)}})}function $c(f,s){var d=f._compositionKey;if(Kt(null),d!==null&&s!=null){if(s===""){s=fn(d),f=ct(f.getElementByKey(d)),f!==null&&f.nodeValue!==null&&Nt(s)&&Be(s,f.nodeValue,null,null,!0);return}if(s[s.length-1]===`
|
|
84
|
-
`&&(d=hn(),kt(d))){s=d.focus,d.anchor.set(s.key,s.offset,s.type),mt(f,I,null);return}}$e(!0,f,s)}function fh(f,s){w?Xa=!0:kr(s,()=>{$c(s,f.data)})}function hh(f,s){if(qa=f.timeStamp,Qu=f.keyCode,!s.isComposing()){var{keyCode:d,shiftKey:x,ctrlKey:A,metaKey:D,altKey:W}=f;if(!mt(s,C,f)){if(d!==39||A||D||W)if(d!==39||W||x||!A&&!D)if(d!==37||A||D||W)if(d!==37||W||x||!A&&!D)if(d!==38||A||D)if(d!==40||A||D)if(d===13&&x)Ja=!0,mt(s,I,f);else if(d===32)mt(s,M,f);else if(F&&A&&d===79)f.preventDefault(),Ja=!0,mt(s,r,!0);else if(d!==13||x){var oe=F?W||D?!1:d===8||d===72&&A:A||W||D?!1:d===8;oe?d===8?mt(s,Y,f):(f.preventDefault(),mt(s,n,!0)):d===27?mt(s,ee,f):(oe=F?x||W||D?!1:d===46||d===68&&A:A||W||D?!1:d===46,oe?d===46?mt(s,re,f):(f.preventDefault(),mt(s,n,!1)):d===8&&(F?W:A)?(f.preventDefault(),mt(s,u,!0)):d===46&&(F?W:A)?(f.preventDefault(),mt(s,u,!1)):F&&D&&d===8?(f.preventDefault(),mt(s,p,!0)):F&&D&&d===46?(f.preventDefault(),mt(s,p,!1)):d===66&&!W&&(F?D:A)?(f.preventDefault(),mt(s,m,"bold")):d===85&&!W&&(F?D:A)?(f.preventDefault(),mt(s,m,"underline")):d===73&&!W&&(F?D:A)?(f.preventDefault(),mt(s,m,"italic")):d!==9||W||A||D?d===90&&!x&&(F?D:A)?(f.preventDefault(),mt(s,_,void 0)):(oe=F?d===90&&D&&x:d===89&&A||d===90&&A&&x,oe?(f.preventDefault(),mt(s,v,void 0)):ni(s._editorState._selection)?(oe=x?!1:d===67?F?D:A:!1,oe?(f.preventDefault(),mt(s,te,f)):(oe=x?!1:d===88?F?D:A:!1,oe?(f.preventDefault(),mt(s,he,f)):d===65&&(F?D:A)&&(f.preventDefault(),mt(s,V,f)))):!w&&d===65&&(F?D:A)&&(f.preventDefault(),mt(s,V,f))):mt(s,Z,f))}else Ja=!1,mt(s,I,f);else mt(s,k,f);else mt(s,O,f);else mt(s,R,f);else mt(s,N,f);else mt(s,y,f);else mt(s,b,f);(A||x||W||D)&&mt(s,ie,f)}}}function ad(f){let s=f.__lexicalEventHandles;return s===void 0&&(s=[],f.__lexicalEventHandles=s),s}let la=new Map;function sd(f){f=f.target;let s=co(f==null?null:f.nodeType===9?f.defaultView:f.ownerDocument.defaultView);if(s!==null){var d=et(s.anchorNode);if(d!==null){Ac&&(Ac=!1,kr(d,()=>{var W=ri(),oe=s.anchorNode;oe!==null&&(oe=oe.nodeType,oe===1||oe===3)&&(W=ki(W,s,d),_r(W))})),f=Ee(d),f=f[f.length-1];var x=f._key,A=la.get(x),D=A||f;D!==d&&od(s,D,!1),od(s,d,!0),d!==f?la.set(x,d):A&&la.delete(x)}}}function ph(f,s){Za===0&&f.ownerDocument.addEventListener("selectionchange",sd),Za++,f.__lexicalEditor=s;let d=ad(f);for(let x=0;x<Sc.length;x++){let[A,D]=Sc[x],W=typeof D=="function"?oe=>{oe._lexicalHandled!==!0&&(oe._lexicalHandled=!0,s.isEditable()&&D(oe,s))}:oe=>{if(oe._lexicalHandled!==!0&&(oe._lexicalHandled=!0,s.isEditable()))switch(A){case"cut":return mt(s,he,oe);case"copy":return mt(s,te,oe);case"paste":return mt(s,a,oe);case"dragstart":return mt(s,J,oe);case"dragover":return mt(s,fe,oe);case"dragend":return mt(s,ge,oe);case"focus":return mt(s,B,oe);case"blur":return mt(s,q,oe);case"drop":return mt(s,U,oe)}};f.addEventListener(A,W),d.push(()=>{f.removeEventListener(A,W)})}}function Oi(f,s,d){rr();var x=f.__key;let A=f.getParent();if(A!==null){var D=hn();if(kt(D)&&nt(f)){var{anchor:W,focus:oe}=D,xe=W.getNode(),Re=oe.getNode();xr(xe,f)&&W.set(f.__key,0,"element"),xr(Re,f)&&oe.set(f.__key,0,"element")}if(xe=D,Re=!1,kt(xe)&&s){D=xe.anchor;let Ve=xe.focus;D.key===x&&(ga(D,f,A,f.getPreviousSibling(),f.getNextSibling()),Re=!0),Ve.key===x&&(ga(Ve,f,A,f.getPreviousSibling(),f.getNextSibling()),Re=!0)}else ni(xe)&&s&&f.isSelected()&&f.selectPrevious();kt(xe)&&s&&!Re?(x=f.getIndexWithinParent(),$t(f),Pi(xe,A,x,-1)):$t(f),d||Mr(A)||A.canBeEmpty()||!A.isEmpty()||Oi(A,s),s&&Tr(A)&&A.isEmpty()&&A.selectEnd()}}class ca{static getType(){H(64,this.name)}static clone(){H(65,this.name)}constructor(s){this.__type=this.constructor.getType(),this.__next=this.__prev=this.__parent=null,Ct(this,s)}getType(){return this.__type}isAttached(){for(var s=this.__key;s!==null;){if(s==="root")return!0;if(s=fn(s),s===null)break;s=s.__parent}return!1}isSelected(s){if(s=s||hn(),s==null)return!1;let d=s.getNodes().some(x=>x.__key===this.__key);return Nt(this)?d:kt(s)&&s.anchor.type==="element"&&s.focus.type==="element"&&s.anchor.key===s.focus.key&&s.anchor.offset===s.focus.offset?!1:d}getKey(){return this.__key}getIndexWithinParent(){var s=this.getParent();if(s===null)return-1;s=s.getFirstChild();let d=0;for(;s!==null;){if(this.is(s))return d;d++,s=s.getNextSibling()}return-1}getParent(){let s=this.getLatest().__parent;return s===null?null:fn(s)}getParentOrThrow(){let s=this.getParent();return s===null&&H(66,this.__key),s}getTopLevelElement(){let s=this;for(;s!==null;){let d=s.getParent();if(Mr(d))return s;s=d}return null}getTopLevelElementOrThrow(){let s=this.getTopLevelElement();return s===null&&H(67,this.__key),s}getParents(){let s=[],d=this.getParent();for(;d!==null;)s.push(d),d=d.getParent();return s}getParentKeys(){let s=[],d=this.getParent();for(;d!==null;)s.push(d.__key),d=d.getParent();return s}getPreviousSibling(){let s=this.getLatest().__prev;return s===null?null:fn(s)}getPreviousSiblings(){let s=[];var d=this.getParent();if(d===null)return s;for(d=d.getFirstChild();d!==null&&!d.is(this);)s.push(d),d=d.getNextSibling();return s}getNextSibling(){let s=this.getLatest().__next;return s===null?null:fn(s)}getNextSiblings(){let s=[],d=this.getNextSibling();for(;d!==null;)s.push(d),d=d.getNextSibling();return s}getCommonAncestor(s){let d=this.getParents();var x=s.getParents();nt(this)&&d.unshift(this),nt(s)&&x.unshift(s),s=d.length;var A=x.length;if(s===0||A===0||d[s-1]!==x[A-1])return null;for(x=new Set(x),A=0;A<s;A++){let D=d[A];if(x.has(D))return D}return null}is(s){return s==null?!1:this.__key===s.__key}isBefore(s){if(this===s)return!1;if(s.isParentOf(this))return!0;if(this.isParentOf(s))return!1;var d=this.getCommonAncestor(s);let x=this;for(;;){var A=x.getParentOrThrow();if(A===d){A=x.getIndexWithinParent();break}x=A}for(x=s;;){if(s=x.getParentOrThrow(),s===d){d=x.getIndexWithinParent();break}x=s}return A<d}isParentOf(s){let d=this.__key;if(d===s.__key)return!1;for(;s!==null;){if(s.__key===d)return!0;s=s.getParent()}return!1}getNodesBetween(s){let d=this.isBefore(s),x=[],A=new Set;for(var D=this;;){var W=D.__key;if(A.has(W)||(A.add(W),x.push(D)),D===s)break;if(W=nt(D)?d?D.getFirstChild():D.getLastChild():null,W!==null)D=W;else if(W=d?D.getNextSibling():D.getPreviousSibling(),W!==null)D=W;else{if(D=D.getParentOrThrow(),A.has(D.__key)||x.push(D),D===s)break;W=D;do W===null&&H(68),D=d?W.getNextSibling():W.getPreviousSibling(),W=W.getParent(),W!==null&&(D!==null||A.has(W.__key)||x.push(W));while(D===null)}}return d||x.reverse(),x}isDirty(){let s=bn()._dirtyLeaves;return s!==null&&s.has(this.__key)}getLatest(){let s=fn(this.__key);return s===null&&H(113),s}getWritable(){rr();var s=qr(),d=bn();s=s._nodeMap;let x=this.__key,A=this.getLatest(),D=A.__parent;d=d._cloneNotNeeded;var W=hn();return Fr(W)&&W.setCachedNodes(null),d.has(x)?(Yt(A),A):(W=A.constructor.clone(A),W.__parent=D,W.__next=A.__next,W.__prev=A.__prev,nt(A)&&nt(W)?(W.__first=A.__first,W.__last=A.__last,W.__size=A.__size,W.__indent=A.__indent,W.__format=A.__format,W.__dir=A.__dir):Nt(A)&&Nt(W)&&(W.__format=A.__format,W.__style=A.__style,W.__mode=A.__mode,W.__detail=A.__detail),d.add(x),W.__key=x,Yt(W),s.set(x,W),W)}getTextContent(){return""}getTextContentSize(){return this.getTextContent().length}createDOM(){H(70)}updateDOM(){H(71)}exportDOM(s){return{element:this.createDOM(s._config,s)}}exportJSON(){H(72)}static importJSON(){H(18,this.name)}static transform(){return null}remove(s){Oi(this,!0,s)}replace(s,d){rr();var x=hn();x!==null&&(x=x.clone()),mc(this,s);let A=this.getLatest(),D=this.__key,W=s.__key,oe=s.getWritable();s=this.getParentOrThrow().getWritable();let xe=s.__size;$t(oe);let Re=A.getPreviousSibling(),Ve=A.getNextSibling(),Ze=A.__prev,Ke=A.__next,Ie=A.__parent;return Oi(A,!1,!0),Re===null?s.__first=W:Re.getWritable().__next=W,oe.__prev=Ze,Ve===null?s.__last=W:Ve.getWritable().__prev=W,oe.__next=Ke,oe.__parent=Ie,s.__size=xe,d&&this.getChildren().forEach(it=>{oe.append(it)}),kt(x)&&(_r(x),d=x.anchor,x=x.focus,d.key===D&&fa(d,oe),x.key===D&&fa(x,oe)),qt()===D&&Kt(W),oe}insertAfter(s,d=!0){rr(),mc(this,s);var x=this.getWritable();let A=s.getWritable();var D=A.getParent();let W=hn();var oe=!1,xe=!1;if(D!==null){var Re=s.getIndexWithinParent();$t(A),kt(W)&&(xe=D.__key,oe=W.anchor,D=W.focus,oe=oe.type==="element"&&oe.key===xe&&oe.offset===Re+1,xe=D.type==="element"&&D.key===xe&&D.offset===Re+1)}D=this.getNextSibling(),Re=this.getParentOrThrow().getWritable();let Ve=A.__key,Ze=x.__next;return D===null?Re.__last=Ve:D.getWritable().__prev=Ve,Re.__size++,x.__next=Ve,A.__next=Ze,A.__prev=x.__key,A.__parent=x.__parent,d&&kt(W)&&(d=this.getIndexWithinParent(),Pi(W,Re,d+1),x=Re.__key,oe&&W.anchor.set(x,d+2,"element"),xe&&W.focus.set(x,d+2,"element")),s}insertBefore(s,d=!0){rr(),mc(this,s);var x=this.getWritable();let A=s.getWritable(),D=A.__key;$t(A);let W=this.getPreviousSibling(),oe=this.getParentOrThrow().getWritable(),xe=x.__prev,Re=this.getIndexWithinParent();return W===null?oe.__first=D:W.getWritable().__next=D,oe.__size++,x.__prev=D,A.__prev=xe,A.__next=x.__key,A.__parent=x.__parent,x=hn(),d&&kt(x)&&(d=this.getParentOrThrow(),Pi(x,d,Re)),s}isParentRequired(){return!1}createParentElementNode(){return po()}selectStart(){return this.selectPrevious()}selectEnd(){return this.selectNext(0,0)}selectPrevious(s,d){rr();let x=this.getPreviousSibling(),A=this.getParentOrThrow();return x===null?A.select(0,0):nt(x)?x.select():Nt(x)?x.select(s,d):(s=x.getIndexWithinParent()+1,A.select(s,s))}selectNext(s,d){rr();let x=this.getNextSibling(),A=this.getParentOrThrow();return x===null?A.select():nt(x)?x.select(0,0):Nt(x)?x.select(s,d):(s=x.getIndexWithinParent(),A.select(s,s))}markDirty(){this.getWritable()}}function Qa(f,s,d){d=d||s.getParentOrThrow().getLastChild();let x=s;for(s=[s];x!==d;){if(!x.getNextSibling())throw Error("insertRangeAfter: lastToInsert must be a later sibling of firstToInsert");x=x.getNextSibling(),s.push(x)}for(let A of s)f=f.insertAfter(A)}class ua extends ca{static getType(){return"linebreak"}static clone(s){return new ua(s.__key)}constructor(s){super(s)}getTextContent(){return`
|
|
85
|
-
`}createDOM(){return document.createElement("br")}updateDOM(){return!1}static importDOM(){return{br:s=>{let d=s.parentElement,x,A;return d!==null&&((x=d.firstChild)===s||x.nextSibling===s&&x.nodeType===3&&(x.textContent||"").match(/^( |\t|\r?\n)+$/)!==null)&&((A=d.lastChild)===s||A.previousSibling===s&&A.nodeType===3&&(A.textContent||"").match(/^( |\t|\r?\n)+$/)!==null)?null:{conversion:es,priority:0}}}}static importJSON(){return Ai()}exportJSON(){return{type:"linebreak",version:1}}}function es(){return{node:Ai()}}function Ai(){return Jo(new ua)}function Ri(f){return f instanceof ua}function $i(f,s){return s&16?"code":s&128?"mark":s&32?"sub":s&64?"sup":null}function ts(f,s){return s&1?"strong":s&2?"em":"span"}function Dc(f,s,d,x,A){f=x.classList,x=xt(A,"base"),x!==void 0&&f.add(...x),x=xt(A,"underlineStrikethrough");let D=!1,W=s&8&&s&4;var oe=d&8&&d&4;x!==void 0&&(oe?(D=!0,W||f.add(...x)):W&&f.remove(...x));for(let xe in ce)oe=ce[xe],x=xt(A,xe),x!==void 0&&(d&oe?!D||xe!=="underline"&&xe!=="strikethrough"?(!(s&oe)||W&&xe==="underline"||xe==="strikethrough")&&f.add(...x):s&oe&&f.remove(...x):s&oe&&f.remove(...x))}function zs(f,s,d){let x=s.firstChild;if(d=d.isComposing(),f+=d?Ce:"",x==null)s.textContent=f;else if(s=x.nodeValue,s!==f)if(d||w){d=s.length;let A=f.length,D=0,W=0;for(;D<d&&D<A&&s[D]===f[D];)D++;for(;W+D<d&&W+D<A&&s[d-W-1]===f[A-W-1];)W++;f=[D,d-D-W,f.slice(D,A-W)];let[oe,xe,Re]=f;xe!==0&&x.deleteData(oe,xe),x.insertData(oe,Re)}else x.nodeValue=f}function da(f,s){return s=document.createElement(s),s.appendChild(f),s}class Qo extends ca{static getType(){return"text"}static clone(s){return new Qo(s.__text,s.__key)}constructor(s,d){super(d),this.__text=s,this.__format=0,this.__style="",this.__detail=this.__mode=0}getFormat(){return this.getLatest().__format}getDetail(){return this.getLatest().__detail}getMode(){let s=this.getLatest();return Qe[s.__mode]}getStyle(){return this.getLatest().__style}isToken(){return this.getLatest().__mode===1}isComposing(){return this.__key===qt()}isSegmented(){return this.getLatest().__mode===2}isDirectionless(){return(this.getLatest().__detail&1)!==0}isUnmergeable(){return(this.getLatest().__detail&2)!==0}hasFormat(s){return s=ce[s],(this.getFormat()&s)!==0}isSimpleText(){return this.__type==="text"&&this.__mode===0}getTextContent(){return this.getLatest().__text}getFormatFlags(s,d){let x=this.getLatest().__format;return pt(x,s,d)}createDOM(s){var d=this.__format,x=$i(this,d);let A=ts(this,d),D=document.createElement(x===null?A:x),W=D;return this.hasFormat("code")&&D.setAttribute("spellcheck","false"),x!==null&&(W=document.createElement(A),D.appendChild(W)),x=W,zs(this.__text,x,this),s=s.theme.text,s!==void 0&&Dc(A,0,d,x,s),d=this.__style,d!==""&&(D.style.cssText=d),D}updateDOM(s,d,x){let A=this.__text;var D=s.__format,W=this.__format,oe=$i(this,D);let xe=$i(this,W);var Re=ts(this,D);let Ve=ts(this,W);return(oe===null?Re:oe)!==(xe===null?Ve:xe)?!0:oe===xe&&Re!==Ve?(D=d.firstChild,D==null&&H(48),s=oe=document.createElement(Ve),zs(A,s,this),x=x.theme.text,x!==void 0&&Dc(Ve,0,W,s,x),d.replaceChild(oe,D),!1):(Re=d,xe!==null&&oe!==null&&(Re=d.firstChild,Re==null&&H(49)),zs(A,Re,this),x=x.theme.text,x!==void 0&&D!==W&&Dc(Ve,D,W,Re,x),W=this.__style,s.__style!==W&&(d.style.cssText=W),!1)}static importDOM(){return{"#text":()=>({conversion:Gs,priority:0}),b:()=>({conversion:Ks,priority:0}),code:()=>({conversion:ei,priority:0}),em:()=>({conversion:ei,priority:0}),i:()=>({conversion:ei,priority:0}),s:()=>({conversion:ei,priority:0}),span:()=>({conversion:yt,priority:0}),strong:()=>({conversion:ei,priority:0}),sub:()=>({conversion:ei,priority:0}),sup:()=>({conversion:ei,priority:0}),u:()=>({conversion:ei,priority:0})}}static importJSON(s){let d=jn(s.text);return d.setFormat(s.format),d.setDetail(s.detail),d.setMode(s.mode),d.setStyle(s.style),d}exportDOM(s){return{element:s}=super.exportDOM(s),s!==null&&Xo(s)||H(132),s.style.whiteSpace="pre-wrap",this.hasFormat("bold")&&(s=da(s,"b")),this.hasFormat("italic")&&(s=da(s,"i")),this.hasFormat("strikethrough")&&(s=da(s,"s")),this.hasFormat("underline")&&(s=da(s,"u")),{element:s}}exportJSON(){return{detail:this.getDetail(),format:this.getFormat(),mode:this.getMode(),style:this.getStyle(),text:this.getTextContent(),type:"text",version:1}}selectionTransform(){}setFormat(s){let d=this.getWritable();return d.__format=typeof s=="string"?ce[s]:s,d}setDetail(s){let d=this.getWritable();return d.__detail=typeof s=="string"?ve[s]:s,d}setStyle(s){let d=this.getWritable();return d.__style=s,d}toggleFormat(s){let d=this.getFormat();return s=pt(d,s,null),this.setFormat(s)}toggleDirectionless(){let s=this.getWritable();return s.__detail^=1,s}toggleUnmergeable(){let s=this.getWritable();return s.__detail^=2,s}setMode(s){if(s=Fe[s],this.__mode===s)return this;let d=this.getWritable();return d.__mode=s,d}setTextContent(s){if(this.__text===s)return this;let d=this.getWritable();return d.__text=s,d}select(s,d){rr();let x=hn();var A=this.getTextContent();let D=this.__key;if(typeof A=="string"?(A=A.length,s===void 0&&(s=A),d===void 0&&(d=A)):d=s=0,kt(x))A=qt(),A!==x.anchor.key&&A!==x.focus.key||Kt(D),x.setTextNodeRange(this,s,this,d);else return uo(D,s,D,d,"text","text");return x}selectStart(){return this.select(0,0)}selectEnd(){let s=this.getTextContentSize();return this.select(s,s)}spliceText(s,d,x,A){let D=this.getWritable(),W=D.__text,oe=x.length,xe=s;0>xe&&(xe=oe+xe,0>xe&&(xe=0));let Re=hn();return A&&kt(Re)&&(s+=oe,Re.setTextNodeRange(D,s,D,s)),d=W.slice(0,xe)+x+W.slice(xe+d),D.__text=d,D}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}splitText(...s){rr();var d=this.getLatest(),x=d.getTextContent(),A=d.__key,D=qt(),W=new Set(s);s=[];for(var oe=x.length,xe="",Re=0;Re<oe;Re++)xe!==""&&W.has(Re)&&(s.push(xe),xe=""),xe+=x[Re];if(xe!==""&&s.push(xe),W=s.length,W===0)return[];if(s[0]===x)return[d];var Ve=s[0];x=d.getParentOrThrow(),Re=d.getFormat();let Ze=d.getStyle(),Ke=d.__detail;oe=!1,d.isSegmented()?(xe=jn(Ve),xe.__format=Re,xe.__style=Ze,xe.__detail=Ke,oe=!0):(xe=d.getWritable(),xe.__text=Ve),d=hn(),xe=[xe],Ve=Ve.length;for(let bt=1;bt<W;bt++){var Ie=s[bt],it=Ie.length;Ie=jn(Ie).getWritable(),Ie.__format=Re,Ie.__style=Ze,Ie.__detail=Ke;let Rt=Ie.__key;if(it=Ve+it,kt(d)){let zt=d.anchor,Rn=d.focus;zt.key===A&&zt.type==="text"&&zt.offset>Ve&&zt.offset<=it&&(zt.key=Rt,zt.offset-=Ve,d.dirty=!0),Rn.key===A&&Rn.type==="text"&&Rn.offset>Ve&&Rn.offset<=it&&(Rn.key=Rt,Rn.offset-=Ve,d.dirty=!0)}D===A&&Kt(Rt),Ve=it,xe.push(Ie)}return A=this.getPreviousSibling(),D=this.getNextSibling(),A!==null&&Yt(A),D!==null&&Yt(D),A=x.getWritable(),D=this.getIndexWithinParent(),oe?(A.splice(D,0,xe),this.remove()):A.splice(D,1,xe),kt(d)&&Pi(d,x,D,W-1),xe}mergeWithSibling(s){var d=s===this.getPreviousSibling();d||s===this.getNextSibling()||H(50);var x=this.__key;let A=s.__key,D=this.__text,W=D.length;qt()===A&&Kt(x);let oe=hn();if(kt(oe)){let xe=oe.anchor,Re=oe.focus;xe!==null&&xe.key===A&&(oi(xe,d,x,s,W),oe.dirty=!0),Re!==null&&Re.key===A&&(oi(Re,d,x,s,W),oe.dirty=!0)}return x=s.__text,this.setTextContent(d?x+D:D+x),d=this.getWritable(),s.remove(),d}isTextEntity(){return!1}}function yt(f){let s=f.style.fontWeight==="700",d=f.style.textDecoration==="line-through",x=f.style.fontStyle==="italic",A=f.style.textDecoration==="underline",D=f.style.verticalAlign;return{forChild:W=>(Nt(W)&&(s&&W.toggleFormat("bold"),d&&W.toggleFormat("strikethrough"),x&&W.toggleFormat("italic"),A&&W.toggleFormat("underline"),D==="sub"&&W.toggleFormat("subscript"),D==="super"&&W.toggleFormat("superscript")),W),node:null}}function Ks(f){let s=f.style.fontWeight==="normal";return{forChild:d=>(Nt(d)&&!s&&d.toggleFormat("bold"),d),node:null}}let ns=new WeakMap;function Gs(f){f.parentElement===null&&H(129);for(var s=f.textContent||"",d,x=f.parentNode,A=[f];x!==null&&(d=ns.get(x))===void 0&&!(x.nodeName==="PRE"||x.nodeType===1&&x.style!==void 0&&x.style.whiteSpace!==void 0&&x.style.whiteSpace.startsWith("pre"));)A.push(x),x=x.parentNode;for(d=d===void 0?x:d,x=0;x<A.length;x++)ns.set(A[x],d);if(d!==null){for(s=s.split(/(\r?\n|\t)/),f=[],A=s.length,d=0;d<A;d++)x=s[d],x===`
|
|
86
|
-
`||x===`\r
|
|
87
|
-
`?f.push(Ai()):x===" "?f.push(Us()):x!==""&&f.push(jn(x));return{node:f}}if(s=s.replace(/\r/g,"").replace(/[ \t\n]+/g," "),s==="")return{node:null};if(s[0]===" "){for(A=f,d=!0;A!==null&&(A=ld(A,!1))!==null;)if(x=A.textContent||"",0<x.length){/[ \t\n]$/.test(x)&&(s=s.slice(1)),d=!1;break}d&&(s=s.slice(1))}if(s[s.length-1]===" "){for(A=!0;f!==null&&(f=ld(f,!0))!==null;)if(0<(f.textContent||"").replace(/^( |\t|\r?\n)+/,"").length){A=!1;break}A&&(s=s.slice(0,s.length-1))}return s===""?{node:null}:{node:jn(s)}}let gh=new RegExp(/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/,"i");function ld(f,s){for(;;){for(var d=void 0;(d=s?f.nextSibling:f.previousSibling)===null;)if(f=f.parentElement,f===null)return null;if(f=d,f.nodeType===1&&(d=f.style.display,d===""&&f.nodeName.match(gh)===null||d!==""&&!d.startsWith("inline")))return null;for(;(d=s?f.firstChild:f.lastChild)!==null;)f=d;if(f.nodeType===3)return f;if(f.nodeName==="BR")return null}}let mh={code:"code",em:"italic",i:"italic",s:"strikethrough",strong:"bold",sub:"subscript",sup:"superscript",u:"underline"};function ei(f){let s=mh[f.nodeName.toLowerCase()];return s===void 0?{node:null}:{forChild:d=>(Nt(d)&&!d.hasFormat(s)&&d.toggleFormat(s),d),node:null}}function jn(f=""){return Jo(new Qo(f))}function Nt(f){return f instanceof Qo}class To extends Qo{static getType(){return"tab"}static clone(s){let d=new To(s.__key);return d.__text=s.__text,d.__format=s.__format,d.__style=s.__style,d}constructor(s){super(" ",s),this.__detail=2}static importDOM(){return null}static importJSON(s){let d=Us();return d.setFormat(s.format),d.setStyle(s.style),d}exportJSON(){return{...super.exportJSON(),type:"tab",version:1}}setTextContent(){H(126)}setDetail(){H(127)}setMode(){H(128)}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}}function Us(){return Jo(new To)}function Mc(f){return f instanceof To}class nr{constructor(s,d,x){this._selection=null,this.key=s,this.offset=d,this.type=x}is(s){return this.key===s.key&&this.offset===s.offset&&this.type===s.type}isBefore(s){let d=this.getNode(),x=s.getNode(),A=this.offset;if(s=s.offset,nt(d)){var D=d.getDescendantByIndex(A);d=D??d}return nt(x)&&(D=x.getDescendantByIndex(s),x=D??x),d===x?A<s:d.isBefore(x)}getNode(){let s=fn(this.key);return s===null&&H(20),s}set(s,d,x){let A=this._selection,D=this.key;this.key=s,this.offset=d,this.type=x,va()||(qt()===D&&Kt(s),A!==null&&(A.setCachedNodes(null),A.dirty=!0))}}function Vs(f,s){let d=s.__key,x=f.offset,A="element";if(Nt(s))A="text",s=s.getTextContentSize(),x>s&&(x=s);else if(!nt(s)){var D=s.getNextSibling();Nt(D)?(d=D.__key,x=0,A="text"):(D=s.getParent())&&(d=D.__key,x=s.getIndexWithinParent()+1)}f.set(d,x,A)}function fa(f,s){if(nt(s)){let d=s.getLastDescendant();nt(d)||Nt(d)?Vs(f,d):Vs(f,s)}else Vs(f,s)}function Ys(f,s,d,x){let A=f.getNode(),D=A.getChildAtIndex(f.offset),W=jn(),oe=Tr(A)?po().append(W):W;W.setFormat(d),W.setStyle(x),D===null?A.append(oe):D.insertBefore(oe),f.is(s)&&s.set(W.__key,0,"text"),f.set(W.__key,0,"text")}function ti(f,s,d,x){f.key=s,f.offset=d,f.type=x}class rs{constructor(s,d){this.anchor=s,this.focus=d,s._selection=this,d._selection=this,this._cachedNodes=null,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(s){this._cachedNodes=s}is(s){return Fr(s)?this.anchor.is(s.anchor)&&this.focus.is(s.focus):!1}isCollapsed(){return!1}extract(){return this.getNodes()}isBackward(){return this.focus.isBefore(this.anchor)}getCharacterOffsets(){return os(this)}}class ha{constructor(s){this.dirty=!1,this._nodes=s,this._cachedNodes=null}getCachedNodes(){return this._cachedNodes}setCachedNodes(s){this._cachedNodes=s}is(s){if(!ni(s))return!1;let d=this._nodes,x=s._nodes;return d.size===x.size&&Array.from(d).every(A=>x.has(A))}add(s){this.dirty=!0,this._nodes.add(s),this._cachedNodes=null}delete(s){this.dirty=!0,this._nodes.delete(s),this._cachedNodes=null}clear(){this.dirty=!0,this._nodes.clear(),this._cachedNodes=null}has(s){return this._nodes.has(s)}clone(){return new ha(new Set(this._nodes))}extract(){return this.getNodes()}insertRawText(){}insertText(){}insertNodes(s){let d=this.getNodes(),x=d.length;var A=d[x-1];if(Nt(A))A=A.select();else{let D=A.getIndexWithinParent()+1;A=A.getParentOrThrow().select(D,D)}for(A.insertNodes(s),s=0;s<x;s++)d[s].remove()}getNodes(){var s=this._cachedNodes;if(s!==null)return s;var d=this._nodes;s=[];for(let x of d)d=fn(x),d!==null&&s.push(d);return va()||(this._cachedNodes=s),s}getTextContent(){let s=this.getNodes(),d="";for(let x=0;x<s.length;x++)d+=s[x].getTextContent();return d}}function kt(f){return f instanceof Mi}function Fr(f){return f instanceof rs}function kc(f){let[s,,d]=qs(f);f=d.getChildren();let x=f.length;var A=f[0].getChildren().length;let D=Array(x);for(var W=0;W<x;W++)D[W]=Array(A);for(A=0;A<x;A++){W=f[A].getChildren();let oe=0;for(let xe=0;xe<W.length;xe++){for(;D[A][oe];)oe++;let Re=W[xe],Ve=Re.__rowSpan||1,Ze=Re.__colSpan||1;for(let Ke=0;Ke<Ve;Ke++)for(let Ie=0;Ie<Ze;Ie++)D[A+Ke][oe+Ie]=Re;if(s===Re)return{colSpan:Ze,columnIndex:oe,rowIndex:A,rowSpan:Ve};oe+=Ze}}return null}class Di extends rs{constructor(s,d,x){super(d,x),this.gridKey=s}getCachedNodes(){return this._cachedNodes}setCachedNodes(s){this._cachedNodes=s}is(s){return cd(s)?this.gridKey===s.gridKey&&this.anchor.is(s.anchor)&&this.focus.is(s.focus):!1}set(s,d,x){this.dirty=!0,this.gridKey=s,this.anchor.key=d,this.focus.key=x,this._cachedNodes=null}clone(){return new Di(this.gridKey,this.anchor,this.focus)}isCollapsed(){return!1}extract(){return this.getNodes()}insertRawText(){}insertText(){}insertNodes(s){let d=this.focus.getNode();ht(d.select(0,d.getChildrenSize())).insertNodes(s)}getShape(){var s=fn(this.anchor.key);if(jr(s)||H(103),s=kc(s),s===null)throw Error("getCellRect: expected to find AnchorNode");var d=fn(this.focus.key);jr(d)||H(104);let x=kc(d);if(x===null)throw Error("getCellRect: expected to find focusCellNode");d=Math.min(s.columnIndex,x.columnIndex);let A=Math.max(s.columnIndex,x.columnIndex),D=Math.min(s.rowIndex,x.rowIndex);return s=Math.max(s.rowIndex,x.rowIndex),{fromX:Math.min(d,A),fromY:Math.min(D,s),toX:Math.max(d,A),toY:Math.max(D,s)}}getNodes(){function s(Rt){let{cell:zt,startColumn:Rn,startRow:Xn}=Rt;Re=Math.min(Re,Rn),Ve=Math.min(Ve,Xn),Ze=Math.max(Ze,Rn+zt.__colSpan-1),Ke=Math.max(Ke,Xn+zt.__rowSpan-1)}var d=this._cachedNodes;if(d!==null)return d;var x=this.anchor.getNode();d=this.focus.getNode();var A=Is(x,jr);x=Is(d,jr),jr(A)||H(103),jr(x)||H(104),d=A.getParent(),cs(d)||H(105),d=d.getParent(),Wc(d)||H(106);var D=x.getParents()[1];if(D!==d){if(d.isParentOf(x)){if(d=D.getParent(),d==null)throw Error("Expected focusCellParent to have a parent");this.set(this.gridKey,x.getKey(),d.getKey())}else{if(d=d.getParent(),d==null)throw Error("Expected gridParent to have a parent");this.set(this.gridKey,d.getKey(),x.getKey())}return this.getNodes()}let[W,oe,xe]=So(d,A,x),Re=Math.min(oe.startColumn,xe.startColumn),Ve=Math.min(oe.startRow,xe.startRow),Ze=Math.max(oe.startColumn+oe.cell.__colSpan-1,xe.startColumn+xe.cell.__colSpan-1),Ke=Math.max(oe.startRow+oe.cell.__rowSpan-1,xe.startRow+xe.cell.__rowSpan-1);x=Re,A=Ve,D=Re;for(var Ie=Ve;Re<x||Ve<A||Ze>D||Ke>Ie;){if(Re<x){var it=Ie-A;--x;for(var bt=0;bt<=it;bt++)s(W[A+bt][x])}if(Ve<A)for(it=D-x,--A,bt=0;bt<=it;bt++)s(W[A][x+bt]);if(Ze>D)for(it=Ie-A,D+=1,bt=0;bt<=it;bt++)s(W[A+bt][D]);if(Ke>Ie)for(it=D-x,Ie+=1,bt=0;bt<=it;bt++)s(W[Ie][x+bt])}for(d=[d],x=null,A=Ve;A<=Ke;A++)for(D=Re;D<=Ze;D++)({cell:Ie}=W[A][D]),it=Ie.getParent(),cs(it)||H(107),it!==x&&d.push(it),d.push(Ie,...bc(Ie)),x=it;return va()||(this._cachedNodes=d),d}getTextContent(){let s=this.getNodes(),d="";for(let x=0;x<s.length;x++)d+=s[x].getTextContent();return d}}function cd(f){return f instanceof Di}class Mi extends rs{constructor(s,d,x,A){super(s,d),this.format=x,this.style=A}getCachedNodes(){return this._cachedNodes}setCachedNodes(s){this._cachedNodes=s}is(s){return kt(s)?this.anchor.is(s.anchor)&&this.focus.is(s.focus)&&this.format===s.format&&this.style===s.style:!1}isCollapsed(){return this.anchor.is(this.focus)}getNodes(){var s=this._cachedNodes;if(s!==null)return s;s=this.anchor;var d=this.focus,x=s.isBefore(d),A=x?s:d;x=x?d:s,s=A.getNode(),d=x.getNode();let D=A.offset;return A=x.offset,nt(s)&&(x=s.getDescendantByIndex(D),s=x??s),nt(d)&&(x=d.getDescendantByIndex(A),x!==null&&x!==s&&d.getChildAtIndex(A)===x&&(x=x.getPreviousSibling()),d=x??d),s=s.is(d)?nt(s)&&0<s.getChildrenSize()?[]:[s]:s.getNodesBetween(d),va()||(this._cachedNodes=s),s}setTextNodeRange(s,d,x,A){ti(this.anchor,s.__key,d,"text"),ti(this.focus,x.__key,A,"text"),this._cachedNodes=null,this.dirty=!0}getTextContent(){let s=this.getNodes();if(s.length===0)return"";let d=s[0],x=s[s.length-1],A=this.anchor,D=this.focus,W=A.isBefore(D),[oe,xe]=os(this),Re="",Ve=!0;for(let Ze=0;Ze<s.length;Ze++){let Ke=s[Ze];if(nt(Ke)&&!Ke.isInline())Ve||(Re+=`
|
|
88
|
-
`),Ve=!Ke.isEmpty();else if(Ve=!1,Nt(Ke)){let Ie=Ke.getTextContent();Ke===d?Ke===x?(A.type!=="element"||D.type!=="element"||D.offset===A.offset)&&(Ie=oe<xe?Ie.slice(oe,xe):Ie.slice(xe,oe)):Ie=W?Ie.slice(oe):Ie.slice(xe):Ke===x&&(Ie=W?Ie.slice(0,xe):Ie.slice(0,oe)),Re+=Ie}else!on(Ke)&&!Ri(Ke)||Ke===x&&this.isCollapsed()||(Re+=Ke.getTextContent())}return Re}applyDOMRange(s){let d=bn(),x=d.getEditorState()._selection;if(s=gr(s.startContainer,s.startOffset,s.endContainer,s.endOffset,d,x),s!==null){var[A,D]=s;ti(this.anchor,A.key,A.offset,A.type),ti(this.focus,D.key,D.offset,D.type),this._cachedNodes=null}}clone(){let s=this.anchor,d=this.focus;return new Mi(new nr(s.key,s.offset,s.type),new nr(d.key,d.offset,d.type),this.format,this.style)}toggleFormat(s){this.format=pt(this.format,s,null),this.dirty=!0}setStyle(s){this.style=s,this.dirty=!0}hasFormat(s){return(this.format&ce[s])!==0}insertRawText(s){s=s.split(/(\r?\n|\t)/);let d=[],x=s.length;for(let A=0;A<x;A++){let D=s[A];D===`
|
|
89
|
-
`||D===`\r
|
|
90
|
-
`?d.push(Ai()):D===" "?d.push(Us()):d.push(jn(D))}this.insertNodes(d)}insertText(s){var d=this.anchor,x=this.focus,A=this.isCollapsed()||d.isBefore(x),D=this.format,W=this.style;A&&d.type==="element"?Ys(d,x,D,W):A||x.type!=="element"||Ys(x,d,D,W);var oe=this.getNodes(),xe=oe.length,Re=A?x:d;x=(A?d:x).offset;var Ve=Re.offset;d=oe[0],Nt(d)||H(26),A=d.getTextContent().length;var Ze=d.getParentOrThrow(),Ke=oe[xe-1];if(this.isCollapsed()&&x===A&&(d.isSegmented()||d.isToken()||!d.canInsertTextAfter()||!Ze.canInsertTextAfter()&&d.getNextSibling()===null)){var Ie=d.getNextSibling();if(Nt(Ie)&&Ie.canInsertTextBefore()&&!ot(Ie)||(Ie=jn(),Ie.setFormat(D),Ze.canInsertTextAfter()?d.insertAfter(Ie):Ze.insertAfter(Ie)),Ie.select(0,0),d=Ie,s!==""){this.insertText(s);return}}else if(this.isCollapsed()&&x===0&&(d.isSegmented()||d.isToken()||!d.canInsertTextBefore()||!Ze.canInsertTextBefore()&&d.getPreviousSibling()===null)){if(Ie=d.getPreviousSibling(),(!Nt(Ie)||ot(Ie))&&(Ie=jn(),Ie.setFormat(D),Ze.canInsertTextBefore()?d.insertBefore(Ie):Ze.insertBefore(Ie)),Ie.select(),d=Ie,s!==""){this.insertText(s);return}}else if(d.isSegmented()&&x!==A)Ze=jn(d.getTextContent()),Ze.setFormat(D),d.replace(Ze),d=Ze;else if(!(this.isCollapsed()||s===""||(Ie=Ke.getParent(),Ze.canInsertTextBefore()&&Ze.canInsertTextAfter()&&(!nt(Ie)||Ie.canInsertTextBefore()&&Ie.canInsertTextAfter())))){this.insertText(""),Bn(this.anchor,this.focus,null),this.insertText(s);return}if(xe===1)if(d.isToken())s=jn(s),s.select(),d.replace(s);else{if(oe=d.getFormat(),xe=d.getStyle(),x===Ve&&(oe!==D||xe!==W))if(d.getTextContent()==="")d.setFormat(D),d.setStyle(W);else{oe=jn(s),oe.setFormat(D),oe.setStyle(W),oe.select(),x===0?d.insertBefore(oe,!1):([xe]=d.splitText(x),xe.insertAfter(oe,!1)),oe.isComposing()&&this.anchor.type==="text"&&(this.anchor.offset-=s.length);return}else if(Mc(d)){s=jn(s),s.setFormat(D),s.setStyle(W),s.select(),d.replace(s);return}d=d.spliceText(x,Ve-x,s,!0),d.getTextContent()===""?d.remove():this.anchor.type==="text"&&(d.isComposing()?this.anchor.offset-=s.length:(this.format=oe,this.style=xe))}else{if(D=new Set([...d.getParentKeys(),...Ke.getParentKeys()]),Ie=nt(d)?d:d.getParentOrThrow(),W=nt(Ke)?Ke:Ke.getParentOrThrow(),Ze=Ke,!Ie.is(W)&&W.isInline())do Ze=W,W=W.getParentOrThrow();while(W.isInline());if(Re.type==="text"&&(Ve!==0||Ke.getTextContent()==="")||Re.type==="element"&&Ke.getIndexWithinParent()<Ve)if(Nt(Ke)&&!Ke.isToken()&&Ve!==Ke.getTextContentSize()){if(Ke.isSegmented()){var it=jn(Ke.getTextContent());Ke.replace(it),Ke=it}Tr(Re.getNode())||Re.type!=="text"||(Ke=Ke.spliceText(0,Ve,"")),D.add(Ke.__key)}else Re=Ke.getParentOrThrow(),Re.canBeEmpty()||Re.getChildrenSize()!==1?Ke.remove():Re.remove();else D.add(Ke.__key);for(Re=W.getChildren(),Ve=new Set(oe),Ke=Ie.is(W),Ie=Ie.isInline()&&d.getNextSibling()===null?Ie:d,it=Re.length-1;0<=it;it--){let bt=Re[it];if(bt.is(d)||nt(bt)&&bt.isParentOf(d))break;bt.isAttached()&&(!Ve.has(bt)||bt.is(Ze)?Ke||Ie.insertAfter(bt,!1):bt.remove())}if(!Ke)for(Re=W,W=null;Re!==null;)Ve=Re.getChildren(),Ke=Ve.length,(Ke===0||Ve[Ke-1].is(W))&&(D.delete(Re.__key),W=Re),Re=Re.getParent();for(d.isToken()?x===A?d.select():(s=jn(s),s.select(),d.replace(s)):(d=d.spliceText(x,A-x,s,!0),d.getTextContent()===""?d.remove():d.isComposing()&&this.anchor.type==="text"&&(this.anchor.offset-=s.length)),s=1;s<xe;s++)d=oe[s],D.has(d.__key)||d.remove()}}removeText(){this.insertText("")}formatText(s){if(this.isCollapsed())this.toggleFormat(s),Kt(null);else{var d=this.getNodes(),x=[];for(var A of d)Nt(A)&&x.push(A);var D=x.length;if(D===0)this.toggleFormat(s),Kt(null);else{A=this.anchor;var W=this.focus,oe=this.isBackward();d=oe?W:A,A=oe?A:W;var xe=0,Re=x[0];if(W=d.type==="element"?0:d.offset,d.type==="text"&&W===Re.getTextContentSize()&&(xe=1,Re=x[1],W=0),Re!=null){oe=Re.getFormatFlags(s,null);var Ve=D-1,Ze=x[Ve];if(D=A.type==="text"?A.offset:Ze.getTextContentSize(),Re.is(Ze))W!==D&&(W===0&&D===Re.getTextContentSize()?Re.setFormat(oe):(s=Re.splitText(W,D),s=W===0?s[0]:s[1],s.setFormat(oe),d.type==="text"&&d.set(s.__key,0,"text"),A.type==="text"&&A.set(s.__key,D-W,"text")),this.format=oe);else{W!==0&&([,Re]=Re.splitText(W),W=0),Re.setFormat(oe);var Ke=Ze.getFormatFlags(s,oe);for(0<D&&(D!==Ze.getTextContentSize()&&([Ze]=Ze.splitText(D)),Ze.setFormat(Ke)),xe+=1;xe<Ve;xe++){let Ie=x[xe];if(!Ie.isToken()){let it=Ie.getFormatFlags(s,Ke);Ie.setFormat(it)}}d.type==="text"&&d.set(Re.__key,W,"text"),A.type==="text"&&A.set(Ze.__key,D,"text"),this.format=oe|Ke}}}}}insertNodes(s){if(s.length!==0){if(this.anchor.key==="root"){this.insertParagraph();var d=hn();if(!kt(d))throw Error("Expected RangeSelection after insertParagraph");return d.insertNodes(s)}var x=_c(this.anchor.getNode(),Ni);if(d=s[s.length-1],"__language"in x)if("__language"in s[0])this.insertText(s[0].getTextContent());else{var A=Ii(this);x.splice(A,0,s),d.selectEnd()}else if(s.some(oe=>(nt(oe)||on(oe))&&!oe.isInline())){d=Zs(s),s=d.getLastDescendant();var D=d.getChildren();d=nt(x)&&x.isEmpty()?null:this.insertParagraph(),A=D[D.length-1];var W=D[0];(oe=>nt(oe)&&Ni(oe)&&!oe.isEmpty()&&nt(x)&&(!x.isEmpty()||"__value"in x&&"__checked"in x))(W)&&(x.append(...W.getChildren()),W=D[1]),W&&Qa(x,W),D=_c(s,Ni),d&&nt(D)&&("__value"in d&&"__checked"in d||Ni(A))&&(D.append(...d.getChildren()),d.remove()),nt(x)&&x.isEmpty()&&x.remove(),s.selectEnd(),s=nt(x)?x.getLastChild():null,Ri(s)&&D!==x&&s.remove()}else A=Ii(this),x.splice(A,0,s),d.selectEnd()}}insertParagraph(){if(this.anchor.key==="root"){var s=po();return Zn().splice(this.anchor.offset,0,[s]),s.select(),s}var d=Ii(this);return s=_c(this.anchor.getNode(),Ni),d=(d=s.getChildAtIndex(d))?[d,...d.getNextSiblings()]:[],(s=s.insertNewAfter(this,!1))?(s.append(...d),s.selectStart(),s):null}insertLineBreak(s){var d=Ai();this.insertNodes([d]),s&&(s=d.getParentOrThrow(),d=d.getIndexWithinParent(),s.select(d,d))}extract(){var s=this.getNodes(),d=s.length,x=d-1,A=this.anchor;let D=this.focus;var W=s[0];let oe=s[x],[xe,Re]=os(this);return d===0?[]:d===1?Nt(W)&&!this.isCollapsed()?(s=xe>Re?Re:xe,x=W.splitText(s,xe>Re?xe:Re),s=s===0?x[0]:x[1],s!=null?[s]:[]):[W]:(d=A.isBefore(D),Nt(W)&&(A=d?xe:Re,A===W.getTextContentSize()?s.shift():A!==0&&([,W]=W.splitText(A),s[0]=W)),Nt(oe)&&(W=oe.getTextContent().length,d=d?Re:xe,d===0?s.pop():d!==W&&([oe]=oe.splitText(d),s[x]=oe)),s)}modify(s,d,x){var A=this.focus,D=this.anchor,W=s==="move",oe=Ot(A,d);if(on(oe)&&!oe.isIsolated())W&&oe.isKeyboardSelectable()?(d=fo(),d.add(oe.__key),_r(d)):(s=d?oe.getPreviousSibling():oe.getNextSibling(),Nt(s)?(oe=s.__key,d=d?s.getTextContent().length:0,A.set(oe,d,"text"),W&&D.set(oe,d,"text")):(x=oe.getParentOrThrow(),nt(s)?(x=s.__key,oe=d?s.getChildrenSize():0):(oe=oe.getIndexWithinParent(),x=x.__key,d||oe++),A.set(x,oe,"element"),W&&D.set(x,oe,"element")));else if(D=bn(),A=co(D._window)){var xe=D._blockCursorElement,Re=D._rootElement;if(Re===null||xe===null||!nt(oe)||oe.isInline()||oe.canBeEmpty()||yc(xe,D,Re),A.modify(s,d?"backward":"forward",x),0<A.rangeCount&&(oe=A.getRangeAt(0),D=this.anchor.getNode(),D=Tr(D)?D:Jn(D),this.applyDOMRange(oe),this.dirty=!0,!W)){for(W=this.getNodes(),s=[],x=!1,xe=0;xe<W.length;xe++)Re=W[xe],xr(Re,D)?s.push(Re):x=!0;x&&0<s.length&&(d?(d=s[0],nt(d)?d.selectStart():d.getParentOrThrow().selectStart()):(d=s[s.length-1],nt(d)?d.selectEnd():d.getParentOrThrow().selectEnd())),(A.anchorNode!==oe.startContainer||A.anchorOffset!==oe.startOffset)&&(d=this.focus,W=this.anchor,A=W.key,oe=W.offset,D=W.type,ti(W,d.key,d.offset,d.type),ti(d,A,oe,D),this._cachedNodes=null)}}}deleteCharacter(s){let d=this.isCollapsed();if(this.isCollapsed()){var x=this.anchor,A=this.focus,D=x.getNode();if(!s&&(x.type==="element"&&nt(D)&&x.offset===D.getChildrenSize()||x.type==="text"&&x.offset===D.getTextContentSize())){var W=D.getParent();if(W=D.getNextSibling()||(W===null?null:W.getNextSibling()),nt(W)&&W.isShadowRoot())return}if(W=Ot(A,s),on(W)&&!W.isIsolated()){W.isKeyboardSelectable()&&nt(D)&&D.getChildrenSize()===0?(D.remove(),s=fo(),s.add(W.__key),_r(s)):(W.remove(),bn().dispatchCommand(e,void 0));return}if(!s&&nt(W)&&nt(D)&&D.isEmpty()){D.remove(),W.selectStart();return}if(this.modify("extend",s,"character"),this.isCollapsed()){if(s&&x.offset===0&&(x.type==="element"?x.getNode():x.getNode().getParentOrThrow()).collapseAtStart(this))return}else{if(W=A.type==="text"?A.getNode():null,D=x.type==="text"?x.getNode():null,W!==null&&W.isSegmented()){if(x=A.offset,A=W.getTextContentSize(),W.is(D)||s&&x!==A||!s&&x!==0){ud(W,s,x);return}}else if(D!==null&&D.isSegmented()&&(x=x.offset,A=D.getTextContentSize(),D.is(W)||s&&x!==0||!s&&x!==A)){ud(D,s,x);return}if(D=this.anchor,W=this.focus,x=D.getNode(),A=W.getNode(),x===A&&D.type==="text"&&W.type==="text"){var oe=D.offset,xe=W.offset;let Re=oe<xe;A=Re?oe:xe,xe=Re?xe:oe,oe=xe-1,A!==oe&&(x=x.getTextContent().slice(A,xe),ia(x)||(s?W.offset=oe:D.offset=oe))}}}this.removeText(),s&&!d&&this.isCollapsed()&&this.anchor.type==="element"&&this.anchor.offset===0&&(s=this.anchor.getNode(),s.isEmpty()&&Tr(s.getParent())&&s.getIndexWithinParent()===0&&s.collapseAtStart(this))}deleteLine(s){this.isCollapsed()&&(this.anchor.type==="text"&&this.modify("extend",s,"lineboundary"),(s?this.focus:this.anchor).offset===0&&this.modify("extend",s,"character")),this.removeText()}deleteWord(s){this.isCollapsed()&&this.modify("extend",s,"word"),this.removeText()}}function ni(f){return f instanceof ha}function pa(f){let s=f.offset;return f.type==="text"?s:(f=f.getNode(),s===f.getChildrenSize()?f.getTextContent().length:0)}function os(f){let s=f.anchor;return f=f.focus,s.type==="element"&&f.type==="element"&&s.key===f.key&&s.offset===f.offset?[0,0]:[pa(s),pa(f)]}function ud(f,s,d){let x=f.getTextContent().split(/(?=\s)/g),A=x.length,D=0,W=0;for(let oe=0;oe<A;oe++){let xe=x[oe],Re=oe===A-1;if(W=D,D+=xe.length,s&&D===d||D>d||Re){x.splice(oe,1),Re&&(W=void 0);break}}s=x.join("").trim(),s===""?f.remove():(f.setTextContent(s),f.select(W,W))}function Pc(f,s,d,x){var A=s;if(f.nodeType===1){let oe=!1;var D=f.childNodes,W=D.length;A===W&&(oe=!0,A=W-1);let xe=D[A];if(W=!1,xe===x._blockCursorElement?(xe=D[A+1],W=!0):x._blockCursorElement!==null&&A--,x=lo(xe),Nt(x))A=oe?x.getTextContentSize():0;else{if(D=lo(f),D===null)return null;if(nt(D)?(f=D.getChildAtIndex(A),(s=nt(f))&&(s=f.getParent(),s=d===null||s===null||!s.canBeEmpty()||s!==d.getNode()),s&&(d=oe?f.getLastDescendant():f.getFirstDescendant(),d===null?(D=f,A=0):(f=d,D=nt(f)?f:f.getParentOrThrow())),Nt(f)?(x=f,D=null,A=oe?f.getTextContentSize():0):f!==D&&oe&&!W&&A++):(A=D.getIndexWithinParent(),A=s===0&&on(D)&&lo(f)===D?A:A+1,D=D.getParentOrThrow()),nt(D))return new nr(D.__key,A,"element")}}else x=lo(f);return Nt(x)?new nr(x.__key,A,"text"):null}function dd(f,s,d){var x=f.offset,A=f.getNode();x===0?(x=A.getPreviousSibling(),A=A.getParent(),s?(d||!s)&&x===null&&nt(A)&&A.isInline()&&(s=A.getPreviousSibling(),Nt(s)&&(f.key=s.__key,f.offset=s.getTextContent().length)):nt(x)&&!d&&x.isInline()?(f.key=x.__key,f.offset=x.getChildrenSize(),f.type="element"):Nt(x)&&(f.key=x.__key,f.offset=x.getTextContent().length)):x===A.getTextContent().length&&(x=A.getNextSibling(),A=A.getParent(),s&&nt(x)&&x.isInline()?(f.key=x.__key,f.offset=0,f.type="element"):(d||s)&&x===null&&nt(A)&&A.isInline()&&!A.canInsertTextAfter()&&(s=A.getNextSibling(),Nt(s)&&(f.key=s.__key,f.offset=0)))}function Bn(f,s,d){if(f.type==="text"&&s.type==="text"){var x=f.isBefore(s);let A=f.is(s);dd(f,x,A),dd(s,!x,A),A&&(s.key=f.key,s.offset=f.offset,s.type=f.type),x=bn(),x.isComposing()&&x._compositionKey!==f.key&&kt(d)&&(x=d.anchor,d=d.focus,ti(f,x.key,x.offset,x.type),ti(s,d.key,d.offset,d.type))}}function gr(f,s,d,x,A,D){return f===null||d===null||!lt(A,f,d)||(s=Pc(f,s,kt(D)?D.anchor:null,A),s===null)||(x=Pc(d,x,kt(D)?D.focus:null,A),x===null||s.type==="element"&&x.type==="element"&&(f=lo(f),d=lo(d),on(f)&&on(d)))?null:(Bn(s,x,D),[s,x])}function uo(f,s,d,x,A,D){let W=qr();return f=new Mi(new nr(f,s,A),new nr(d,x,D),0,""),f.dirty=!0,W._selection=f}function fo(){return new ha(new Set)}function Er(f){let s=f.getEditorState()._selection,d=co(f._window);return kt(s)||s==null?ki(s,d,f):s.clone()}function ki(f,s,d){var x=d._window;if(x===null)return null;var A=x.event,D=A?A.type:void 0;x=D==="selectionchange",A=!st&&(x||D==="beforeinput"||D==="compositionstart"||D==="compositionend"||D==="click"&&A&&A.detail===3||D==="drop"||D===void 0);let W;if(!kt(f)||A){if(s===null)return null;if(A=s.anchorNode,D=s.focusNode,W=s.anchorOffset,s=s.focusOffset,x&&kt(f)&&!lt(d,A,D))return f.clone()}else return f.clone();if(d=gr(A,W,D,s,d,f),d===null)return null;let[oe,xe]=d;return new Mi(oe,xe,kt(f)?f.format:0,kt(f)?f.style:"")}function hn(){return qr()._selection}function ri(){return bn()._editorState._selection}function Pi(f,s,d,x=1){var A=f.anchor,D=f.focus,W=A.getNode(),oe=D.getNode();if(s.is(W)||s.is(oe)){if(W=s.__key,f.isCollapsed())s=A.offset,(d<=s&&0<x||d<s&&0>x)&&(d=Math.max(0,s+x),A.set(W,d,"element"),D.set(W,d,"element"),is(f));else{let Re=f.isBackward();oe=Re?D:A;var xe=oe.getNode();A=Re?A:D,D=A.getNode(),s.is(xe)&&(xe=oe.offset,(d<=xe&&0<x||d<xe&&0>x)&&oe.set(W,Math.max(0,xe+x),"element")),s.is(D)&&(s=A.offset,(d<=s&&0<x||d<s&&0>x)&&A.set(W,Math.max(0,s+x),"element"))}is(f)}}function is(f){var s=f.anchor,d=s.offset;let x=f.focus;var A=x.offset,D=s.getNode(),W=x.getNode();if(f.isCollapsed())nt(D)&&(W=D.getChildrenSize(),W=(A=d>=W)?D.getChildAtIndex(W-1):D.getChildAtIndex(d),Nt(W)&&(d=0,A&&(d=W.getTextContentSize()),s.set(W.__key,d,"text"),x.set(W.__key,d,"text")));else{if(nt(D)){let oe=D.getChildrenSize();d=(f=d>=oe)?D.getChildAtIndex(oe-1):D.getChildAtIndex(d),Nt(d)&&(D=0,f&&(D=d.getTextContentSize()),s.set(d.__key,D,"text"))}nt(W)&&(d=W.getChildrenSize(),A=(s=A>=d)?W.getChildAtIndex(d-1):W.getChildAtIndex(A),Nt(A)&&(W=0,s&&(W=A.getTextContentSize()),x.set(A.__key,W,"text")))}}function Ic(f,s){if(s=s.getEditorState()._selection,f=f._selection,kt(f)){var d=f.anchor;let x=f.focus,A;d.type==="text"&&(A=d.getNode(),A.selectionTransform(s,f)),x.type==="text"&&(d=x.getNode(),A!==d&&d.selectionTransform(s,f))}}function ga(f,s,d,x,A){let D=null,W=0,oe=null;x!==null?(D=x.__key,Nt(x)?(W=x.getTextContentSize(),oe="text"):nt(x)&&(W=x.getChildrenSize(),oe="element")):A!==null&&(D=A.__key,Nt(A)?oe="text":nt(A)&&(oe="element")),D!==null&&oe!==null?f.set(D,W,oe):(W=s.getIndexWithinParent(),W===-1&&(W=d.getChildrenSize()),f.set(d.__key,W,"element"))}function oi(f,s,d,x,A){f.type==="text"?(f.key=d,s||(f.offset+=A)):f.offset>x.getIndexWithinParent()&&--f.offset}function So(f,s,d){let x=[],A=null,D=null;f=f.getChildren();for(let Ve=0;Ve<f.length;Ve++){var W=f[Ve];cs(W)||H(108);var oe=W.getChildren();W=0;for(let Ze of oe){for(jr(Ze)||H(109);x[Ve]!==void 0&&x[Ve][W]!==void 0;)W++;oe=Ve;var xe=W,Re=Ze;let Ke={cell:Re,startColumn:xe,startRow:oe},Ie=Re.__rowSpan,it=Re.__colSpan;for(let bt=0;bt<Ie;bt++){x[oe+bt]===void 0&&(x[oe+bt]=[]);for(let Rt=0;Rt<it;Rt++)x[oe+bt][xe+Rt]=Ke}s.is(Re)&&(A=Ke),d.is(Re)&&(D=Ke),W+=Ze.__colSpan}}return A===null&&H(110),D===null&&H(111),[x,A,D]}function qs(f){f instanceof Bc||(f instanceof ca?(f=Is(f,jr),jr(f)||H(114)):(f=Is(f.getNode(),jr),jr(f)||H(114)));let s=f.getParent();cs(s)||H(115);let d=s.getParent();return Wc(d)||H(116),[f,s,d]}function Ii(f){f.isCollapsed()||f.removeText();var s=f.anchor,d=s.getNode();if(!Nt(d))return s.offset;let x=d.getParent();return x?(d=d.splitText(s.offset),d.length===0?0:(s=s.offset===0?0:1,d=d[0].getIndexWithinParent()+s,!x.isInline()||d===0?d:((d=x.getChildAtIndex(d))&&x.insertNewAfter(f).append(d,...d.getNextSiblings()),x.getIndexWithinParent()+s))):(f=po(),Zn().append(f),f.select(),0)}function Zs(f){let s=po(),d=null;for(let x=0;x<f.length;x++){let A=f[x],D=Ri(A);if(D||on(A)&&A.isInline()||nt(A)&&A.isInline()||Nt(A)||A.isParentRequired()){if(d===null&&(d=A.createParentElementNode(),s.append(d),D))continue;d!==null&&d.append(A)}else s.append(A),d=null}return s}let Hn=null,yn=null,Nr=!1,Js=!1,ma=0,as={characterData:!0,childList:!0,subtree:!0};function va(){return Nr||Hn!==null&&Hn._readOnly}function rr(){Nr&&H(13)}function qr(){return Hn===null&&H(15),Hn}function bn(){return yn===null&&H(16),yn}function Lc(f,s,d){var x=s.__type;let A=f._nodes.get(x);for(A===void 0&&H(30,x),f=d.get(x),f===void 0&&(f=Array.from(A.transforms),d.set(x,f)),d=f.length,x=0;x<d&&(f[x](s),s.isAttached());x++);}function vh(f,s){s=s._dirtyLeaves,f=f._nodeMap;for(let d of s)s=f.get(d),Nt(s)&&s.isAttached()&&s.isSimpleText()&&!s.isUnmergeable()&&tt(s)}function Xs(f,s){let d=s._dirtyLeaves,x=s._dirtyElements;f=f._nodeMap;let A=qt(),D=new Map;var W=d;let oe=W.size;for(var xe=x,Re=xe.size;0<oe||0<Re;){if(0<oe){s._dirtyLeaves=new Set;for(let Ve of W)W=f.get(Ve),Nt(W)&&W.isAttached()&&W.isSimpleText()&&!W.isUnmergeable()&&tt(W),W!==void 0&&W!==void 0&&W.__key!==A&&W.isAttached()&&Lc(s,W,D),d.add(Ve);if(W=s._dirtyLeaves,oe=W.size,0<oe){ma++;continue}}s._dirtyLeaves=new Set,s._dirtyElements=new Map;for(let Ve of xe)xe=Ve[0],Re=Ve[1],(xe==="root"||Re)&&(W=f.get(xe),W!==void 0&&W!==void 0&&W.__key!==A&&W.isAttached()&&Lc(s,W,D),x.set(xe,Re));W=s._dirtyLeaves,oe=W.size,xe=s._dirtyElements,Re=xe.size,ma++}s._dirtyLeaves=d,s._dirtyElements=x}function Fc(f,s){var d=f.type,x=s.get(d);if(x===void 0&&H(17,d),d=x.klass,f.type!==d.getType()&&H(18,d.name),d=d.importJSON(f),f=f.children,nt(d)&&Array.isArray(f))for(x=0;x<f.length;x++){let A=Fc(f[x],s);d.append(A)}return d}function ya(f,s){let d=Hn,x=Nr,A=yn;Hn=f,Nr=!0,yn=null;try{return s()}finally{Hn=d,Nr=x,yn=A}}function ii(f,s){let d=f._pendingEditorState,x=f._rootElement,A=f._headless||x===null;if(d!==null){var D=f._editorState,W=D._selection,oe=d._selection,xe=f._dirtyType!==0,Re=Hn,Ve=Nr,Ze=yn,Ke=f._updating,Ie=f._observer,it=null;if(f._pendingEditorState=null,f._editorState=d,!A&&xe&&Ie!==null){yn=f,Hn=d,Nr=!1,f._updating=!0;try{let pn=f._dirtyType,wt=f._dirtyElements,ir=f._dirtyLeaves;Ie.disconnect();var bt=pn,Rt=wt,zt=ir;tr=Eo=An="",Ga=bt===2,Vr=null,fr=f,Co=f._config,Ur=f._nodes,kn=fr._listeners.mutation,Fn=Rt,Fs=zt,Yr=D._nodeMap,wo=d._nodeMap,xc=d._readOnly,js=new Map(f._keyToDOMMap);let Br=new Map;Ua=Br,Si("root",null),Ua=js=Co=wo=Yr=Fs=Fn=Ur=fr=void 0,it=Br}catch(pn){if(pn instanceof Error&&f._onError(pn),Js)throw pn;jc(f,null,x,d),je(f),f._dirtyType=2,Js=!0,ii(f,D),Js=!1;return}finally{Ie.observe(x,as),f._updating=Ke,Hn=Re,Nr=Ve,yn=Ze}}d._readOnly||(d._readOnly=!0);var Rn=f._dirtyLeaves,Xn=f._dirtyElements,us=f._normalizedNodes,Sr=f._updateTags,Ao=f._deferred;xe&&(f._dirtyType=0,f._cloneNotNeeded.clear(),f._dirtyLeaves=new Set,f._dirtyElements=new Map,f._normalizedNodes=new Set,f._updateTags=new Set);var tl=f._decorators,Ea=f._pendingDecorators||tl,vd=d._nodeMap,zc;for(zc in Ea)vd.has(zc)||(Ea===tl&&(Ea=Zo(f)),delete Ea[zc]);var Zr=A?null:co(f._window);if(f._editable&&Zr!==null&&(xe||oe===null||oe.dirty)){yn=f,Hn=d;try{if(Ie!==null&&Ie.disconnect(),xe||oe===null||oe.dirty){let pn=f._blockCursorElement;pn!==null&&yc(pn,f,x);e:{let wt=Zr.anchorNode,ir=Zr.focusNode,Br=Zr.anchorOffset,li=Zr.focusOffset,Pr=document.activeElement;if(!(Sr.has("collaboration")&&Pr!==x||Pr!==null&&qe(Pr)))if(kt(oe)){var Ca=oe.anchor,wa=oe.focus,ai=Ca.key,yh=wa.key,yd=Gt(f,ai),Kc=Gt(f,yh),nl=Ca.offset,bd=wa.offset,Gc=oe.format,Uc=oe.style,Vc=oe.isCollapsed(),ds=yd,Jr=Kc,Un=!1;if(Ca.type==="text"){ds=ct(yd);let ar=Ca.getNode();Un=ar.getFormat()!==Gc||ar.getStyle()!==Uc}else kt(W)&&W.anchor.type==="text"&&(Un=!0);if(wa.type==="text"&&(Jr=ct(Kc)),ds!==null&&Jr!==null){if(Vc&&(W===null||Un||kt(W)&&(W.format!==Gc||W.style!==Uc))){var Tt=performance.now();td=[Gc,Uc,nl,ai,Tt]}if(Br===nl&&li===bd&&wt===ds&&ir===Jr&&(Zr.type!=="Range"||!Vc)&&(Pr!==null&&x.contains(Pr)||x.focus({preventScroll:!0}),Ca.type!=="element"))break e;try{Zr.setBaseAndExtent(ds,nl,Jr,bd)}catch{}if(!Sr.has("skip-scroll-into-view")&&oe.isCollapsed()&&x!==null&&x===document.activeElement){let ar=oe instanceof Mi&&oe.anchor.type==="element"?ds.childNodes[nl]||null:0<Zr.rangeCount?Zr.getRangeAt(0):null;if(ar!==null){let mr;if(ar instanceof Text){let Ir=document.createRange();Ir.selectNode(ar),mr=Ir.getBoundingClientRect()}else mr=ar.getBoundingClientRect();let $o=x.ownerDocument,Do=$o.defaultView;if(Do!==null)for(var{top:si,bottom:Na}=mr,fs,rl,or=x;or!==null;){let Ir=or===$o.body;if(Ir)fs=0,rl=wn(f).innerHeight;else{let al=or.getBoundingClientRect();fs=al.top,rl=al.bottom}let ji=0;if(si<fs?ji=-(fs-si):Na>rl&&(ji=Na-rl),ji!==0)if(Ir)Do.scrollBy(0,ji);else{let al=or.scrollTop;or.scrollTop+=ji;let qc=or.scrollTop-al;si-=qc,Na-=qc}if(Ir)break;or=mn(or)}}}Oc=!0}}else W!==null&<(f,wt,ir)&&Zr.removeAllRanges()}}e:{let pn=f._blockCursorElement;if(kt(oe)&&oe.isCollapsed()&&oe.anchor.type==="element"&&x.contains(document.activeElement)){let wt=oe.anchor,ir=wt.getNode(),Br=wt.offset,li=ir.getChildrenSize(),Pr=!1,ar=null;if(Br===li){let mr=ir.getChildAtIndex(Br-1);vc(mr)&&(Pr=!0)}else{let mr=ir.getChildAtIndex(Br);if(vc(mr)){let $o=mr.getPreviousSibling();($o===null||vc($o))&&(Pr=!0,ar=f.getElementByKey(mr.__key))}}if(Pr){let mr=f.getElementByKey(ir.__key);if(pn===null){let $o=f._config.theme,Do=document.createElement("div");Do.contentEditable="false",Do.setAttribute("data-lexical-cursor","true");let Ir=$o.blockCursor;if(Ir!==void 0){if(typeof Ir=="string"){let ji=Ir.split(" ");Ir=$o.blockCursor=ji}Ir!==void 0&&Do.classList.add(...Ir)}f._blockCursorElement=pn=Do}x.style.caretColor="transparent",ar===null?mr.appendChild(pn):mr.insertBefore(pn,ar);break e}}pn!==null&&yc(pn,f,x)}Ie!==null&&Ie.observe(x,as)}finally{yn=Ze,Hn=Re}}if(it!==null){var Yc=it;let pn=Array.from(f._listeners.mutation),wt=pn.length;for(let ir=0;ir<wt;ir++){let[Br,li]=pn[ir],Pr=Yc.get(li);Pr!==void 0&&Br(Pr,{dirtyLeaves:Rn,prevEditorState:D,updateTags:Sr})}}kt(oe)||oe===null||W!==null&&W.is(oe)||f.dispatchCommand(e,void 0);var ol=f._pendingDecorators;ol!==null&&(f._decorators=ol,f._pendingDecorators=null,ss("decorator",f,!0,ol));var _d=oa(s||D),Ro=oa(d);if(_d!==Ro&&ss("textcontent",f,!0,Ro),ss("update",f,!0,{dirtyElements:Xn,dirtyLeaves:Rn,editorState:d,normalizedNodes:us,prevEditorState:s||D,tags:Sr}),f._deferred=[],Ao.length!==0){let pn=f._updating;f._updating=!0;try{for(let wt=0;wt<Ao.length;wt++)Ao[wt]()}finally{f._updating=pn}}var il=f._updates;if(il.length!==0){let pn=il.shift();if(pn){let[wt,ir]=pn;hd(f,wt,ir)}}}}function ss(f,s,d,...x){let A=s._updating;s._updating=d;try{let D=Array.from(s._listeners[f]);for(f=0;f<D.length;f++)D[f].apply(null,x)}finally{s._updating=A}}function mt(f,s,d){if(f._updating===!1||yn!==f){let D=!1;return f.update(()=>{D=mt(f,s,d)}),D}let x=Ee(f);for(let D=4;0<=D;D--)for(let W=0;W<x.length;W++){var A=x[W]._commands.get(s);if(A!==void 0&&(A=A[D],A!==void 0)){A=Array.from(A);let oe=A.length;for(let xe=0;xe<oe;xe++)if(A[xe](d,f)===!0)return!0}}return!1}function fd(f,s){let d=f._updates;for(s=s||!1;d.length!==0;){var x=d.shift();if(x){let[A,D]=x,W;D!==void 0&&(x=D.onUpdate,W=D.tag,D.skipTransforms&&(s=!0),x&&f._deferred.push(x),W&&f._updateTags.add(W)),A()}}return s}function hd(f,s,d){let x=f._updateTags;var A,D=A=!1;if(d!==void 0){var W=d.onUpdate;A=d.tag,A!=null&&x.add(A),A=d.skipTransforms||!1,D=d.discrete||!1}W&&f._deferred.push(W),d=f._editorState,W=f._pendingEditorState;let oe=!1;(W===null||W._readOnly)&&(W=f._pendingEditorState=new xa(new Map((W||d)._nodeMap)),oe=!0),W._flushSync=D,D=Hn;let xe=Nr,Re=yn,Ve=f._updating;Hn=W,Nr=!1,f._updating=!0,yn=f;try{oe&&(f._headless?d._selection!=null&&(W._selection=d._selection.clone()):W._selection=Er(f));let Ze=f._compositionKey;s(),A=fd(f,A),Ic(W,f),f._dirtyType!==0&&(A?vh(W,f):Xs(W,f),fd(f),ah(d,W,f._dirtyLeaves,f._dirtyElements)),Ze!==f._compositionKey&&(W._flushSync=!0);let Ke=W._selection;if(kt(Ke)){let Ie=W._nodeMap,it=Ke.focus.key;Ie.get(Ke.anchor.key)!==void 0&&Ie.get(it)!==void 0||H(19)}else ni(Ke)&&Ke._nodes.size===0&&(W._selection=null)}catch(Ze){Ze instanceof Error&&f._onError(Ze),f._pendingEditorState=d,f._dirtyType=2,f._cloneNotNeeded.clear(),f._dirtyLeaves=new Set,f._dirtyElements.clear(),ii(f);return}finally{Hn=D,Nr=xe,yn=Re,f._updating=Ve,ma=0}f._dirtyType!==0||_a(W,f)?W._flushSync?(W._flushSync=!1,ii(f)):oe&&Xe(()=>{ii(f)}):(W._flushSync=!1,oe&&(x.clear(),f._deferred=[],f._pendingEditorState=null))}function kr(f,s,d){f._updating?f._updates.push([s,d]):hd(f,s,d)}class Qs extends ca{constructor(s){super(s)}decorate(){H(47)}isIsolated(){return!1}isInline(){return!0}isKeyboardSelectable(){return!0}}function on(f){return f instanceof Qs}class Oo extends ca{constructor(s){super(s),this.__last=this.__first=null,this.__indent=this.__format=this.__size=0,this.__dir=null}getFormat(){return this.getLatest().__format}getFormatType(){let s=this.getFormat();return Pe[s]||""}getIndent(){return this.getLatest().__indent}getChildren(){let s=[],d=this.getFirstChild();for(;d!==null;)s.push(d),d=d.getNextSibling();return s}getChildrenKeys(){let s=[],d=this.getFirstChild();for(;d!==null;)s.push(d.__key),d=d.getNextSibling();return s}getChildrenSize(){return this.getLatest().__size}isEmpty(){return this.getChildrenSize()===0}isDirty(){let s=bn()._dirtyElements;return s!==null&&s.has(this.__key)}isLastChild(){let s=this.getLatest(),d=this.getParentOrThrow().getLastChild();return d!==null&&d.is(s)}getAllTextNodes(){let s=[],d=this.getFirstChild();for(;d!==null;){if(Nt(d)&&s.push(d),nt(d)){let x=d.getAllTextNodes();s.push(...x)}d=d.getNextSibling()}return s}getFirstDescendant(){let s=this.getFirstChild();for(;s!==null;){if(nt(s)){let d=s.getFirstChild();if(d!==null){s=d;continue}}break}return s}getLastDescendant(){let s=this.getLastChild();for(;s!==null;){if(nt(s)){let d=s.getLastChild();if(d!==null){s=d;continue}}break}return s}getDescendantByIndex(s){let d=this.getChildren(),x=d.length;return s>=x?(s=d[x-1],nt(s)&&s.getLastDescendant()||s||null):(s=d[s],nt(s)&&s.getFirstDescendant()||s||null)}getFirstChild(){let s=this.getLatest().__first;return s===null?null:fn(s)}getFirstChildOrThrow(){let s=this.getFirstChild();return s===null&&H(45,this.__key),s}getLastChild(){let s=this.getLatest().__last;return s===null?null:fn(s)}getLastChildOrThrow(){let s=this.getLastChild();return s===null&&H(96,this.__key),s}getChildAtIndex(s){var d=this.getChildrenSize();let x;if(s<d/2){for(x=this.getFirstChild(),d=0;x!==null&&d<=s;){if(d===s)return x;x=x.getNextSibling(),d++}return null}for(x=this.getLastChild(),--d;x!==null&&d>=s;){if(d===s)return x;x=x.getPreviousSibling(),d--}return null}getTextContent(){let s="",d=this.getChildren(),x=d.length;for(let A=0;A<x;A++){let D=d[A];s+=D.getTextContent(),nt(D)&&A!==x-1&&!D.isInline()&&(s+=`
|
|
91
|
-
|
|
92
|
-
`)}return s}getTextContentSize(){let s=0,d=this.getChildren(),x=d.length;for(let A=0;A<x;A++){let D=d[A];s+=D.getTextContentSize(),nt(D)&&A!==x-1&&!D.isInline()&&(s+=2)}return s}getDirection(){return this.getLatest().__dir}hasFormat(s){return s!==""?(s=ke[s],(this.getFormat()&s)!==0):!1}select(s,d){rr();let x=hn(),A=s,D=d;var W=this.getChildrenSize();if(!this.canBeEmpty()){if(s===0&&d===0){if(s=this.getFirstChild(),Nt(s)||nt(s))return s.select(0,0)}else if(!(s!==void 0&&s!==W||d!==void 0&&d!==W)&&(s=this.getLastChild(),Nt(s)||nt(s)))return s.select()}if(A===void 0&&(A=W),D===void 0&&(D=W),W=this.__key,kt(x))x.anchor.set(W,A,"element"),x.focus.set(W,D,"element"),x.dirty=!0;else return uo(W,A,W,D,"element","element");return x}selectStart(){let s=this.getFirstDescendant();return s?s.selectStart():this.select()}selectEnd(){let s=this.getLastDescendant();return s?s.selectEnd():this.select()}clear(){let s=this.getWritable();return this.getChildren().forEach(d=>d.remove()),s}append(...s){return this.splice(this.getChildrenSize(),0,s)}setDirection(s){let d=this.getWritable();return d.__dir=s,d}setFormat(s){return this.getWritable().__format=s!==""?ke[s]:0,this}setIndent(s){return this.getWritable().__indent=s,this}splice(s,d,x){let A=x.length,D=this.getChildrenSize(),W=this.getWritable(),oe=W.__key;var xe=[],Re=[];let Ve=this.getChildAtIndex(s+d),Ze=null,Ke=D-d+A;if(s!==0)if(s===D)Ze=this.getLastChild();else{var Ie=this.getChildAtIndex(s);Ie!==null&&(Ze=Ie.getPreviousSibling())}if(0<d){var it=Ze===null?this.getFirstChild():Ze.getNextSibling();for(Ie=0;Ie<d;Ie++){it===null&&H(100);var bt=it.getNextSibling(),Rt=it.__key;it=it.getWritable(),$t(it),Re.push(Rt),it=bt}}for(Ie=Ze,bt=0;bt<A;bt++){Rt=x[bt],Ie!==null&&Rt.is(Ie)&&(Ze=Ie=Ie.getPreviousSibling()),it=Rt.getWritable(),it.__parent===oe&&Ke--,$t(it);let zt=Rt.__key;Ie===null?(W.__first=zt,it.__prev=null):(Ie=Ie.getWritable(),Ie.__next=zt,it.__prev=Ie.__key),Rt.__key===oe&&H(76),it.__parent=oe,xe.push(zt),Ie=Rt}if(s+d===D?Ie!==null&&(Ie.getWritable().__next=null,W.__last=Ie.__key):Ve!==null&&(s=Ve.getWritable(),Ie!==null?(d=Ie.getWritable(),s.__prev=Ie.__key,d.__next=Ve.__key):s.__prev=null),W.__size=Ke,Re.length&&(s=hn(),kt(s))){Re=new Set(Re),xe=new Set(xe);let{anchor:zt,focus:Rn}=s;ba(zt,Re,xe)&&ga(zt,zt.getNode(),this,Ze,Ve),ba(Rn,Re,xe)&&ga(Rn,Rn.getNode(),this,Ze,Ve),Ke!==0||this.canBeEmpty()||Mr(this)||this.remove()}return W}exportJSON(){return{children:[],direction:this.getDirection(),format:this.getFormatType(),indent:this.getIndent(),type:"element",version:1}}insertNewAfter(){return null}canIndent(){return!0}collapseAtStart(){return!1}excludeFromCopy(){return!1}canExtractContents(){return!0}canReplaceWith(){return!0}canInsertAfter(){return!0}canBeEmpty(){return!0}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}isInline(){return!1}isShadowRoot(){return!1}canMergeWith(){return!1}extractWithChild(){return!1}}function nt(f){return f instanceof Oo}function ba(f,s,d){for(f=f.getNode();f;){let x=f.__key;if(s.has(x)&&!d.has(x))return!0;f=f.getParent()}return!1}class Li extends Oo{static getType(){return"root"}static clone(){return new Li}constructor(){super("root"),this.__cachedText=null}getTopLevelElementOrThrow(){H(51)}getTextContent(){let s=this.__cachedText;return!va()&&bn()._dirtyType!==0||s===null?super.getTextContent():s}remove(){H(52)}replace(){H(53)}insertBefore(){H(54)}insertAfter(){H(55)}updateDOM(){return!1}append(...s){for(let d=0;d<s.length;d++){let x=s[d];nt(x)||on(x)||H(56)}return super.append(...s)}static importJSON(s){let d=Zn();return d.setFormat(s.format),d.setIndent(s.indent),d.setDirection(s.direction),d}exportJSON(){return{children:[],direction:this.getDirection(),format:this.getFormatType(),indent:this.getIndent(),type:"root",version:1}}collapseAtStart(){return!0}}function Tr(f){return f instanceof Li}function _a(f,s){if(s=s.getEditorState()._selection,f=f._selection,f!==null){if(f.dirty||!f.is(s))return!0}else if(s!==null)return!0;return!1}function Fi(){return new xa(new Map([["root",new Li]]))}function el(f){let s=f.exportJSON();var d=f.constructor;s.type!==d.getType()&&H(130,d.name);let x=s.children;if(nt(f))for(Array.isArray(x)||H(59,d.name),f=f.getChildren(),d=0;d<f.length;d++){let A=el(f[d]);x.push(A)}return s}class xa{constructor(s,d){this._nodeMap=s,this._selection=d||null,this._readOnly=this._flushSync=!1}isEmpty(){return this._nodeMap.size===1&&this._selection===null}read(s){return ya(this,s)}clone(s){return s=new xa(this._nodeMap,s===void 0?this._selection:s),s._readOnly=!0,s}toJSON(){return ya(this,()=>({root:el(Zn())}))}}class ho extends Oo{static getType(){return"paragraph"}static clone(s){return new ho(s.__key)}createDOM(s){let d=document.createElement("p");return s=xt(s.theme,"paragraph"),s!==void 0&&d.classList.add(...s),d}updateDOM(){return!1}static importDOM(){return{p:()=>({conversion:ls,priority:0})}}exportDOM(s){if({element:s}=super.exportDOM(s),s&&Xo(s)){this.isEmpty()&&s.append(document.createElement("br"));var d=this.getFormatType();s.style.textAlign=d,(d=this.getDirection())&&(s.dir=d),d=this.getIndent(),0<d&&(s.style.textIndent=`${20*d}px`)}return{element:s}}static importJSON(s){let d=po();return d.setFormat(s.format),d.setIndent(s.indent),d.setDirection(s.direction),d}exportJSON(){return{...super.exportJSON(),type:"paragraph",version:1}}insertNewAfter(s,d){s=po();let x=this.getDirection();return s.setDirection(x),this.insertAfter(s,d),s}collapseAtStart(){let s=this.getChildren();if(s.length===0||Nt(s[0])&&s[0].getTextContent().trim()===""){if(this.getNextSibling()!==null)return this.selectNext(),this.remove(),!0;if(this.getPreviousSibling()!==null)return this.selectPrevious(),this.remove(),!0}return!1}}function ls(f){let s=po();return f.style&&(s.setFormat(f.style.textAlign),f=parseInt(f.style.textIndent,10)/20,0<f&&s.setIndent(f)),{node:s}}function po(){return Jo(new ho)}function jc(f,s,d,x){let A=f._keyToDOMMap;A.clear(),f._editorState=Fi(),f._pendingEditorState=x,f._compositionKey=null,f._dirtyType=0,f._cloneNotNeeded.clear(),f._dirtyLeaves=new Set,f._dirtyElements.clear(),f._normalizedNodes=new Set,f._updateTags=new Set,f._updates=[],f._blockCursorElement=null,x=f._observer,x!==null&&(x.disconnect(),f._observer=null),s!==null&&(s.textContent=""),d!==null&&(d.textContent="",A.set("root",d))}function pd(f,s){let d=new Map,x=new Set,A=D=>{Object.keys(D).forEach(W=>{let oe=d.get(W);oe===void 0&&(oe=[],d.set(W,oe)),oe.push(D[W])})};return f.forEach(D=>{D=D.klass.importDOM!=null?D.klass.importDOM.bind(D.klass):null,D==null||x.has(D)||(x.add(D),D=D(),D!==null&&A(D))}),s&&A(s),d}class gd{constructor(s,d,x,A,D,W,oe){this._parentEditor=d,this._rootElement=null,this._editorState=s,this._compositionKey=this._pendingEditorState=null,this._deferred=[],this._keyToDOMMap=new Map,this._updates=[],this._updating=!1,this._listeners={decorator:new Set,editable:new Set,mutation:new Map,root:new Set,textcontent:new Set,update:new Set},this._commands=new Map,this._config=A,this._nodes=x,this._decorators={},this._pendingDecorators=null,this._dirtyType=0,this._cloneNotNeeded=new Set,this._dirtyLeaves=new Set,this._dirtyElements=new Map,this._normalizedNodes=new Set,this._updateTags=new Set,this._observer=null,this._key=ae(),this._onError=D,this._htmlConversions=W,this._editable=oe,this._headless=d!==null&&d._headless,this._blockCursorElement=this._window=null}isComposing(){return this._compositionKey!=null}registerUpdateListener(s){let d=this._listeners.update;return d.add(s),()=>{d.delete(s)}}registerEditableListener(s){let d=this._listeners.editable;return d.add(s),()=>{d.delete(s)}}registerDecoratorListener(s){let d=this._listeners.decorator;return d.add(s),()=>{d.delete(s)}}registerTextContentListener(s){let d=this._listeners.textcontent;return d.add(s),()=>{d.delete(s)}}registerRootListener(s){let d=this._listeners.root;return s(this._rootElement,null),d.add(s),()=>{s(null,this._rootElement),d.delete(s)}}registerCommand(s,d,x){x===void 0&&H(35);let A=this._commands;A.has(s)||A.set(s,[new Set,new Set,new Set,new Set,new Set]);let D=A.get(s);D===void 0&&H(36,String(s));let W=D[x];return W.add(d),()=>{W.delete(d),D.every(oe=>oe.size===0)&&A.delete(s)}}registerMutationListener(s,d){this._nodes.get(s.getType())===void 0&&H(37,s.name);let x=this._listeners.mutation;return x.set(d,s),()=>{x.delete(d)}}registerNodeTransformToKlass(s,d){var x=s.getType();return x=this._nodes.get(x),x===void 0&&H(37,s.name),x.transforms.add(d),x}registerNodeTransform(s,d){var x=this.registerNodeTransformToKlass(s,d);let A=[x];return x=x.replaceWithKlass,x!=null&&(x=this.registerNodeTransformToKlass(x,d),A.push(x)),wr(this,s.getType()),()=>{A.forEach(D=>D.transforms.delete(d))}}hasNode(s){return this._nodes.has(s.getType())}hasNodes(s){return s.every(this.hasNode.bind(this))}dispatchCommand(s,d){return mt(this,s,d)}getDecorators(){return this._decorators}getRootElement(){return this._rootElement}getKey(){return this._key}setRootElement(s){let d=this._rootElement;if(s!==d){let W=xt(this._config.theme,"root");var x=this._pendingEditorState||this._editorState;if(this._rootElement=s,jc(this,d,s,x),d!==null){if(!this._config.disableEvents){Za!==0&&(Za--,Za===0&&d.ownerDocument.removeEventListener("selectionchange",sd));var A=d.__lexicalEditor;if(A!=null){if(A._parentEditor!==null){var D=Ee(A);D=D[D.length-1]._key,la.get(D)===A&&la.delete(D)}else la.delete(A._key);d.__lexicalEditor=null}for(A=ad(d),D=0;D<A.length;D++)A[D]();d.__lexicalEventHandles=[]}W!=null&&d.classList.remove(...W)}s!==null?(x=(x=s.ownerDocument)&&x.defaultView||null,A=s.style,A.userSelect="text",A.whiteSpace="pre-wrap",A.wordBreak="break-word",s.setAttribute("data-lexical-editor","true"),this._window=x,this._dirtyType=2,je(this),this._updateTags.add("history-merge"),ii(this),this._config.disableEvents||ph(s,this),W!=null&&s.classList.add(...W)):(this._editorState=x,this._window=this._pendingEditorState=null),ss("root",this,!1,s,d)}}getElementByKey(s){return this._keyToDOMMap.get(s)||null}getEditorState(){return this._editorState}setEditorState(s,d){s.isEmpty()&&H(38),De(this);let x=this._pendingEditorState,A=this._updateTags;d=d!==void 0?d.tag:null,x===null||x.isEmpty()||(d!=null&&A.add(d),ii(this)),this._pendingEditorState=s,this._dirtyType=2,this._dirtyElements.set("root",!1),this._compositionKey=null,d!=null&&A.add(d),ii(this)}parseEditorState(s,d){s=typeof s=="string"?JSON.parse(s):s;let x=Fi(),A=Hn,D=Nr,W=yn,oe=this._dirtyElements,xe=this._dirtyLeaves,Re=this._cloneNotNeeded,Ve=this._dirtyType;this._dirtyElements=new Map,this._dirtyLeaves=new Set,this._cloneNotNeeded=new Set,this._dirtyType=0,Hn=x,Nr=!1,yn=this;try{Fc(s.root,this._nodes),d&&d(),x._readOnly=!0}catch(Ze){Ze instanceof Error&&this._onError(Ze)}finally{this._dirtyElements=oe,this._dirtyLeaves=xe,this._cloneNotNeeded=Re,this._dirtyType=Ve,Hn=A,Nr=D,yn=W}return x}update(s,d){kr(this,s,d)}focus(s,d={}){let x=this._rootElement;x!==null&&(x.setAttribute("autocapitalize","off"),kr(this,()=>{let A=hn(),D=Zn();A!==null?A.dirty=!0:D.getChildrenSize()!==0&&(d.defaultSelection==="rootStart"?D.selectStart():D.selectEnd())},{onUpdate:()=>{x.removeAttribute("autocapitalize"),s&&s()},tag:"focus"}),this._pendingEditorState===null&&x.removeAttribute("autocapitalize"))}blur(){var s=this._rootElement;s!==null&&s.blur(),s=co(this._window),s!==null&&s.removeAllRanges()}isEditable(){return this._editable}setEditable(s){this._editable!==s&&(this._editable=s,ss("editable",this,!0,s))}toJSON(){return{editorState:this._editorState.toJSON()}}}class Bc extends Oo{constructor(s,d){super(d),this.__colSpan=s,this.__rowSpan=1}exportJSON(){return{...super.exportJSON(),colSpan:this.__colSpan,rowSpan:this.__rowSpan}}getColSpan(){return this.__colSpan}setColSpan(s){return this.getWritable().__colSpan=s,this}getRowSpan(){return this.__rowSpan}setRowSpan(s){return this.getWritable().__rowSpan=s,this}}function jr(f){return f instanceof Bc}class Hc extends Oo{}function Wc(f){return f instanceof Hc}class md extends Oo{}function cs(f){return f instanceof md}return Ue.$INTERNAL_isPointSelection=Fr,Ue.$addUpdateTag=function(f){rr(),bn()._updateTags.add(f)},Ue.$applyNodeReplacement=Jo,Ue.$copyNode=aa,Ue.$createLineBreakNode=Ai,Ue.$createNodeSelection=fo,Ue.$createParagraphNode=po,Ue.$createRangeSelection=function(){let f=new nr("root",0,"element"),s=new nr("root",0,"element");return new Mi(f,s,0,"")},Ue.$createTabNode=Us,Ue.$createTextNode=jn,Ue.$getAdjacentNode=Ot,Ue.$getNearestNodeFromDOMNode=Cr,Ue.$getNearestRootOrShadowRoot=Jn,Ue.$getNodeByKey=fn,Ue.$getPreviousSelection=ri,Ue.$getRoot=Zn,Ue.$getSelection=hn,Ue.$getTextContent=function(){let f=hn();return f===null?"":f.getTextContent()},Ue.$hasAncestor=xr,Ue.$hasUpdateTag=function(f){return bn()._updateTags.has(f)},Ue.$insertNodes=function(f){let s=hn()||ri();s===null&&(s=Zn().selectEnd()),s.insertNodes(f)},Ue.$isBlockElementNode=function(f){return nt(f)&&!f.isInline()},Ue.$isDecoratorNode=on,Ue.$isElementNode=nt,Ue.$isInlineElementOrDecoratorNode=function(f){return nt(f)&&f.isInline()||on(f)&&f.isInline()},Ue.$isLeafNode=function(f){return Nt(f)||Ri(f)||on(f)},Ue.$isLineBreakNode=Ri,Ue.$isNodeSelection=ni,Ue.$isParagraphNode=function(f){return f instanceof ho},Ue.$isRangeSelection=kt,Ue.$isRootNode=Tr,Ue.$isRootOrShadowRoot=Mr,Ue.$isTabNode=Mc,Ue.$isTextNode=Nt,Ue.$nodesOfType=function(f){var s=qr();let d=s._readOnly,x=f.getType();s=s._nodeMap;let A=[];for(let[,D]of s)D instanceof f&&D.__type===x&&(d||D.isAttached())&&A.push(D);return A},Ue.$normalizeSelection__EXPERIMENTAL=ht,Ue.$parseSerializedNode=function(f){return Fc(f,bn()._nodes)},Ue.$selectAll=function(){var f=Zn();f=f.select(0,f.getChildrenSize()),_r(ht(f))},Ue.$setCompositionKey=Kt,Ue.$setSelection=_r,Ue.$splitNode=function(f,s){let d=f.getChildAtIndex(s);d==null&&(d=f),Mr(f)&&H(102);let x=W=>{const oe=W.getParentOrThrow(),xe=Mr(oe),Re=W!==d||xe?aa(W):W;if(xe)return W.insertAfter(Re),[W,Re,Re];const[Ve,Ze,Ke]=x(oe);return W=W.getNextSiblings(),Ke.append(Re,...W),[Ve,Ze,Re]},[A,D]=x(d);return[A,D]},Ue.BLUR_COMMAND=q,Ue.CAN_REDO_COMMAND={},Ue.CAN_UNDO_COMMAND={},Ue.CLEAR_EDITOR_COMMAND={},Ue.CLEAR_HISTORY_COMMAND={},Ue.CLICK_COMMAND=t,Ue.COMMAND_PRIORITY_CRITICAL=4,Ue.COMMAND_PRIORITY_EDITOR=0,Ue.COMMAND_PRIORITY_HIGH=3,Ue.COMMAND_PRIORITY_LOW=1,Ue.COMMAND_PRIORITY_NORMAL=2,Ue.CONTROLLED_TEXT_INSERTION_COMMAND=i,Ue.COPY_COMMAND=te,Ue.CUT_COMMAND=he,Ue.DELETE_CHARACTER_COMMAND=n,Ue.DELETE_LINE_COMMAND=p,Ue.DELETE_WORD_COMMAND=u,Ue.DEPRECATED_$computeGridMap=So,Ue.DEPRECATED_$createGridSelection=function(){let f=new nr("root",0,"element"),s=new nr("root",0,"element");return new Di("root",f,s)},Ue.DEPRECATED_$getGridCellNodeRect=kc,Ue.DEPRECATED_$getNodeTriplet=qs,Ue.DEPRECATED_$isGridCellNode=jr,Ue.DEPRECATED_$isGridNode=Wc,Ue.DEPRECATED_$isGridRowNode=cs,Ue.DEPRECATED_$isGridSelection=cd,Ue.DEPRECATED_GridCellNode=Bc,Ue.DEPRECATED_GridNode=Hc,Ue.DEPRECATED_GridRowNode=md,Ue.DRAGEND_COMMAND=ge,Ue.DRAGOVER_COMMAND=fe,Ue.DRAGSTART_COMMAND=J,Ue.DROP_COMMAND=U,Ue.DecoratorNode=Qs,Ue.ElementNode=Oo,Ue.FOCUS_COMMAND=B,Ue.FORMAT_ELEMENT_COMMAND={},Ue.FORMAT_TEXT_COMMAND=m,Ue.INDENT_CONTENT_COMMAND={},Ue.INSERT_LINE_BREAK_COMMAND=r,Ue.INSERT_PARAGRAPH_COMMAND=o,Ue.INSERT_TAB_COMMAND={},Ue.KEY_ARROW_DOWN_COMMAND=k,Ue.KEY_ARROW_LEFT_COMMAND=N,Ue.KEY_ARROW_RIGHT_COMMAND=b,Ue.KEY_ARROW_UP_COMMAND=O,Ue.KEY_BACKSPACE_COMMAND=Y,Ue.KEY_DELETE_COMMAND=re,Ue.KEY_DOWN_COMMAND=C,Ue.KEY_ENTER_COMMAND=I,Ue.KEY_ESCAPE_COMMAND=ee,Ue.KEY_MODIFIER_COMMAND=ie,Ue.KEY_SPACE_COMMAND=M,Ue.KEY_TAB_COMMAND=Z,Ue.LineBreakNode=ua,Ue.MOVE_TO_END=y,Ue.MOVE_TO_START=R,Ue.OUTDENT_CONTENT_COMMAND={},Ue.PASTE_COMMAND=a,Ue.ParagraphNode=ho,Ue.REDO_COMMAND=v,Ue.REMOVE_TEXT_COMMAND=l,Ue.RootNode=Li,Ue.SELECTION_CHANGE_COMMAND=e,Ue.SELECT_ALL_COMMAND=V,Ue.TabNode=To,Ue.TextNode=Qo,Ue.UNDO_COMMAND=_,Ue.createCommand=function(){return{}},Ue.createEditor=function(f){var s=f||{},d=yn,x=s.theme||{};let A=f===void 0?d:s.parentEditor||null,D=s.disableEvents||!1,W=Fi(),oe=s.namespace||(A!==null?A._config.namespace:ae()),xe=s.editorState,Re=[Li,Qo,ua,To,ho,...s.nodes||[]],{onError:Ve,html:Ze}=s;if(s=s.editable!==void 0?s.editable:!0,f===void 0&&d!==null)f=d._nodes;else for(f=new Map,d=0;d<Re.length;d++){let Ie=Re[d],it=null;var Ke=null;typeof Ie!="function"&&(Ke=Ie,Ie=Ke.replace,it=Ke.with,Ke=Ke.withKlass||null);let bt=Ie.getType(),Rt=Ie.transform(),zt=new Set;Rt!==null&&zt.add(Rt),f.set(bt,{exportDOM:Ze&&Ze.export?Ze.export.get(Ie):void 0,klass:Ie,replace:it,replaceWithKlass:Ke,transforms:zt})}return x=new gd(W,A,f,{disableEvents:D,namespace:oe,theme:x},Ve||console.error,pd(f,Ze?Ze.import:void 0),s),xe!==void 0&&(x._pendingEditorState=xe,x._dirtyType=2),x},Ue.getNearestEditorFromDOMNode=et,Ue.isHTMLAnchorElement=function(f){return Xo(f)&&f.tagName==="A"},Ue.isHTMLElement=Xo,Ue.isSelectionCapturedInDecoratorInput=qe,Ue.isSelectionWithinEditor=lt,Ue}var ny,ry;function Xt(){return ry||(ry=1,ny=process.env.NODE_ENV==="development"?SO():OO()),ny}var oy;function AO(){if(oy)return Rh;oy=1;var e=ur(),t=Xt(),n=z;const r=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";var o=r?n.useLayoutEffect:n.useEffect;const i={tag:"history-merge"};function a({initialConfig:u,children:p}){const m=n.useMemo(()=>{const{theme:_,namespace:v,editor__DEPRECATED:C,nodes:b,onError:y,editorState:N,html:R}=u,O=e.createLexicalComposerContext(null,_);let k=C||null;if(k===null){const I=t.createEditor({editable:u.editable,html:R,namespace:v,nodes:b,onError:M=>y(M,I),theme:_});l(I,N),k=I}return[k,O]},[]);return o(()=>{const _=u.editable,[v]=m;v.setEditable(_!==void 0?_:!0)},[]),n.createElement(e.LexicalComposerContext.Provider,{value:m},p)}function l(u,p){if(p!==null){if(p===void 0)u.update(()=>{const m=t.$getRoot();if(m.isEmpty()){const _=t.$createParagraphNode();m.append(_);const v=r?document.activeElement:null;(t.$getSelection()!==null||v!==null&&v===u.getRootElement())&&_.select()}},i);else if(p!==null)switch(typeof p){case"string":{const m=u.parseEditorState(p);u.setEditorState(m,i);break}case"object":{u.setEditorState(p,i);break}case"function":{u.update(()=>{t.$getRoot().isEmpty()&&p(u)},i);break}}}}return Rh.LexicalComposer=a,Rh}var $h={},iy;function RO(){if(iy)return $h;iy=1;var e=ur(),t=Xt(),n=z;let r=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";var o=r?n.useLayoutEffect:n.useEffect;let i={tag:"history-merge"};function a(l,u){if(u!==null){if(u===void 0)l.update(()=>{var p=t.$getRoot();if(p.isEmpty()){let m=t.$createParagraphNode();p.append(m),p=r?document.activeElement:null,(t.$getSelection()!==null||p!==null&&p===l.getRootElement())&&m.select()}},i);else if(u!==null)switch(typeof u){case"string":let p=l.parseEditorState(u);l.setEditorState(p,i);break;case"object":l.setEditorState(u,i);break;case"function":l.update(()=>{t.$getRoot().isEmpty()&&u(l)},i)}}}return $h.LexicalComposer=function({initialConfig:l,children:u}){let p=n.useMemo(()=>{const{theme:m,namespace:_,editor__DEPRECATED:v,nodes:C,onError:b,editorState:y,html:N}=l,R=e.createLexicalComposerContext(null,m);let O=v||null;if(O===null){const k=t.createEditor({editable:l.editable,html:N,namespace:_,nodes:C,onError:I=>b(I,k),theme:m});a(k,y),O=k}return[O,R]},[]);return o(()=>{let m=l.editable,[_]=p;_.setEditable(m!==void 0?m:!0)},[]),n.createElement(e.LexicalComposerContext.Provider,{value:p},u)},$h}process.env.NODE_ENV==="development"?AO():RO();var Dh={},Mh,ay;function $O(){if(ay)return Mh;ay=1;var e=ur(),t=z,n=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?t.useLayoutEffect:t.useEffect;function r(a){const[l]=e.useLexicalComposerContext(),u=t.useMemo(()=>a(l),[l,a]),p=t.useRef(u.initialValueFn()),[m,_]=t.useState(p.current);return n(()=>{const{initialValueFn:v,subscribe:C}=u,b=v();return p.current!==b&&(p.current=b,_(b)),C(y=>{p.current=y,_(y)})},[u,a]),m}function o(a){return{initialValueFn:()=>a.isEditable(),subscribe:l=>a.registerEditableListener(l)}}function i(){return r(o)}return Mh=i,Mh}var kh,sy;function DO(){if(sy)return kh;sy=1;var e=ur(),t=z,n=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?t.useLayoutEffect:t.useEffect;function r(i){let[a]=e.useLexicalComposerContext(),l=t.useMemo(()=>i(a),[a,i]),u=t.useRef(l.initialValueFn()),[p,m]=t.useState(u.current);return n(()=>{let{initialValueFn:_,subscribe:v}=l,C=_();return u.current!==C&&(u.current=C,m(C)),v(b=>{u.current=b,m(b)})},[l,i]),p}function o(i){return{initialValueFn:()=>i.isEditable(),subscribe:a=>i.registerEditableListener(a)}}return kh=function(){return r(o)},kh}var ly,cy;function Zx(){return cy||(cy=1,ly=process.env.NODE_ENV==="development"?$O():DO()),ly}var zi={},uy;function MO(){if(uy)return zi;uy=1;var e=Xt();function t(u,p){let m=u.getFirstChild(),_=0;e:for(;m!==null;){if(e.$isElementNode(m)){const b=m.getFirstChild();if(b!==null){m=b;continue}}else if(e.$isTextNode(m)){const b=m.getTextContentSize();if(_+b>p)return{node:m,offset:p-_};_+=b}const v=m.getNextSibling();if(v!==null){m=v;continue}let C=m.getParent();for(;C!==null;){const b=C.getNextSibling();if(b!==null){m=b;continue e}C=C.getParent()}break}return null}function n(u,p=!0){if(u)return!1;let m=o();return p&&(m=m.trim()),m===""}function r(u,p){return()=>n(u,p)}function o(){return e.$getRoot().getTextContent()}function i(u){if(!n(u,!1))return!1;const p=e.$getRoot().getChildren(),m=p.length;if(m>1)return!1;for(let _=0;_<m;_++){const v=p[_];if(e.$isDecoratorNode(v))return!1;if(e.$isElementNode(v)){if(!e.$isParagraphNode(v)||v.__indent!==0)return!1;const C=v.getChildren(),b=C.length;for(let y=0;y<b;y++){const N=C[_];if(!e.$isTextNode(N))return!1}}}return!0}function a(u){return()=>i(u)}function l(u,p,m,_){const v=k=>k instanceof m,C=k=>{const I=e.$createTextNode(k.getTextContent());I.setFormat(k.getFormat()),k.replace(I)},b=k=>k.getLatest().__mode,y=k=>{if(!k.isSimpleText())return;const I=k.getPreviousSibling();let M=k.getTextContent(),Y=k,ee;if(e.$isTextNode(I)){const re=I.getTextContent(),Z=re+M,U=p(Z);if(v(I))if(U===null||b(I)!==0){C(I);return}else{const J=U.end-re.length;if(J>0){const fe=M.slice(0,J),ge=re+fe;if(I.select(),I.setTextContent(ge),J===M.length)k.remove();else{const te=M.slice(J);k.setTextContent(te)}return}}else if(U===null||U.start<re.length)return}for(;;){ee=p(M);let re=ee===null?"":M.slice(ee.end);if(M=re,re===""){const J=Y.getNextSibling();if(e.$isTextNode(J)){re=Y.getTextContent()+J.getTextContent();const fe=p(re);if(fe===null){v(J)?C(J):J.markDirty();return}else if(fe.start!==0)return}}else{const J=p(re);if(J!==null&&J.start===0)return}if(ee===null)return;if(ee.start===0&&e.$isTextNode(I)&&I.isTextEntity())continue;let Z;ee.start===0?[Z,Y]=Y.splitText(ee.end):[,Z,Y]=Y.splitText(ee.start,ee.end);const U=_(Z);if(U.setFormat(Z.getFormat()),Z.replace(U),Y==null)return}},N=k=>{const I=k.getTextContent(),M=p(I);if(M===null||M.start!==0){C(k);return}if(I.length>M.end){k.splitText(M.end);return}const Y=k.getPreviousSibling();e.$isTextNode(Y)&&Y.isTextEntity()&&(C(Y),C(k));const ee=k.getNextSibling();e.$isTextNode(ee)&&ee.isTextEntity()&&(C(ee),v(k)&&C(k))},R=u.registerNodeTransform(e.TextNode,y),O=u.registerNodeTransform(m,N);return[R,O]}return zi.$canShowPlaceholder=i,zi.$canShowPlaceholderCurry=a,zi.$findTextIntersectionFromCharacters=t,zi.$isRootTextContentEmpty=n,zi.$isRootTextContentEmptyCurry=r,zi.$rootTextContent=o,zi.registerLexicalTextEntity=l,zi}var Ki={},dy;function kO(){if(dy)return Ki;dy=1;var e=Xt();function t(o,i=!0){return o?!1:(o=n(),i&&(o=o.trim()),o==="")}function n(){return e.$getRoot().getTextContent()}function r(o){if(!t(o,!1))return!1;o=e.$getRoot().getChildren();let i=o.length;if(1<i)return!1;for(let l=0;l<i;l++){var a=o[l];if(e.$isDecoratorNode(a))return!1;if(e.$isElementNode(a)){if(!e.$isParagraphNode(a)||a.__indent!==0)return!1;a=a.getChildren();let u=a.length;for(let p=0;p<u;p++)if(!e.$isTextNode(a[l]))return!1}}return!0}return Ki.$canShowPlaceholder=r,Ki.$canShowPlaceholderCurry=function(o){return()=>r(o)},Ki.$findTextIntersectionFromCharacters=function(o,i){var a=o.getFirstChild();o=0;e:for(;a!==null;){if(e.$isElementNode(a)){var l=a.getFirstChild();if(l!==null){a=l;continue}}else if(e.$isTextNode(a)){if(l=a.getTextContentSize(),o+l>i)return{node:a,offset:i-o};o+=l}if(l=a.getNextSibling(),l!==null)a=l;else{for(a=a.getParent();a!==null;){if(l=a.getNextSibling(),l!==null){a=l;continue e}a=a.getParent()}break}}return null},Ki.$isRootTextContentEmpty=t,Ki.$isRootTextContentEmptyCurry=function(o,i){return()=>t(o,i)},Ki.$rootTextContent=n,Ki.registerLexicalTextEntity=function(o,i,a,l){let u=m=>{const _=e.$createTextNode(m.getTextContent());_.setFormat(m.getFormat()),m.replace(_)},p=o.registerNodeTransform(e.TextNode,m=>{if(m.isSimpleText()){var _=m.getPreviousSibling(),v=m.getTextContent(),C=m;if(e.$isTextNode(_)){var b=_.getTextContent(),y=i(b+v);if(_ instanceof a){if(y===null||_.getLatest().__mode!==0){u(_);return}if(y=y.end-b.length,0<y){C=v.slice(0,y),C=b+C,_.select(),_.setTextContent(C),y===v.length?m.remove():(_=v.slice(y),m.setTextContent(_));return}}else if(y===null||y.start<b.length)return}for(;;){if(m=i(v),v=y=m===null?"":v.slice(m.end),y===""){if(b=C.getNextSibling(),e.$isTextNode(b)){if(y=C.getTextContent()+b.getTextContent(),y=i(y),y===null){b instanceof a?u(b):b.markDirty();break}else if(y.start!==0)break}}else if(b=i(y),b!==null&&b.start===0)break;if(m===null)break;if(m.start===0&&e.$isTextNode(_)&&_.isTextEntity())continue;let N;if(m.start===0?[N,C]=C.splitText(m.end):[,N,C]=C.splitText(m.start,m.end),m=l(N),m.setFormat(N.getFormat()),N.replace(m),C==null)break}}});return o=o.registerNodeTransform(a,m=>{var _=m.getTextContent();const v=i(_);v===null||v.start!==0?u(m):_.length>v.end?m.splitText(v.end):(_=m.getPreviousSibling(),e.$isTextNode(_)&&_.isTextEntity()&&(u(_),u(m)),_=m.getNextSibling(),e.$isTextNode(_)&&_.isTextEntity()&&(u(_),m instanceof a&&u(m)))}),[p,o]},Ki}var fy,hy;function Jx(){return hy||(hy=1,fy=process.env.NODE_ENV==="development"?MO():kO()),fy}var Pn={},sr={},py;function PO(){if(py)return sr;py=1;var e=Xt();const t=new Map;function n(V){let B=V;for(;B!=null;){if(B.nodeType===Node.TEXT_NODE)return B;B=B.firstChild}return null}function r(V){const B=V.parentNode;if(B==null)throw new Error("Should never happen");return[B,Array.from(B.childNodes).indexOf(V)]}function o(V,B,q,ie,H){const j=B.getKey(),Q=ie.getKey(),F=document.createRange();let w=V.getElementByKey(j),T=V.getElementByKey(Q),P=q,X=H;if(e.$isTextNode(B)&&(w=n(w)),e.$isTextNode(ie)&&(T=n(T)),B===void 0||ie===void 0||w===null||T===null)return null;w.nodeName==="BR"&&([w,P]=r(w)),T.nodeName==="BR"&&([T,X]=r(T));const ue=w.firstChild;w===T&&ue!=null&&ue.nodeName==="BR"&&P===0&&X===0&&(X=1);try{F.setStart(w,P),F.setEnd(T,X)}catch{return null}return F.collapsed&&(P!==X||j!==Q)&&(F.setStart(T,X),F.setEnd(w,P)),F}function i(V,B){const q=V.getRootElement();if(q===null)return[];const ie=q.getBoundingClientRect(),H=getComputedStyle(q),j=parseFloat(H.paddingLeft)+parseFloat(H.paddingRight),Q=Array.from(B.getClientRects());let F=Q.length;Q.sort((T,P)=>{const X=T.top-P.top;return Math.abs(X)<=3?T.left-P.left:X});let w;for(let T=0;T<F;T++){const P=Q[T],X=w&&w.top<=P.top&&w.top+w.height>P.top&&w.left+w.width>P.left,ue=P.width+j===ie.width;if(X||ue){Q.splice(T--,1),F--;continue}w=P}return Q}function a(V){const B={},q=V.split(";");for(const ie of q)if(ie!==""){const[H,j]=ie.split(/:([^]+)/);H&&j&&(B[H.trim()]=j.trim())}return B}function l(V){let B=t.get(V);return B===void 0&&(B=a(V),t.set(V,B)),Object.freeze(B),B}function u(V){let B="";for(const q in V)q&&(B+=`${q}: ${V[q]};`);return B}function p(V,B){return V.__first=B.__first,V.__last=B.__last,V.__size=B.__size,V.__format=B.__format,V.__indent=B.__indent,V.__dir=B.__dir,V}function m(V,B){return V.__format=B.__format,V.__style=B.__style,V.__mode=B.__mode,V.__detail=B.__detail,V}function _(V){const B=V.constructor.clone(V);return B.__parent=V.__parent,B.__next=V.__next,B.__prev=V.__prev,e.$isElementNode(V)&&e.$isElementNode(B)?p(B,V):e.$isTextNode(V)&&e.$isTextNode(B)?m(B,V):B}function v(V,B){if(B.isSelected()&&!B.isSegmented()&&!B.isToken()&&e.$INTERNAL_isPointSelection(V)){const q=V.anchor.getNode(),ie=V.focus.getNode(),H=B.is(q),j=B.is(ie);if(H||j){const Q=V.isBackward(),[F,w]=V.getCharacterOffsets(),T=q.is(ie),P=B.is(Q?ie:q),X=B.is(Q?q:ie);let ue=0,pe;if(T)ue=F>w?w:F,pe=F>w?F:w;else if(P)ue=Q?w:F,pe=void 0;else if(X){const se=Q?F:w;ue=0,pe=se}return B.__text=B.__text.slice(ue,pe),B}}return B}function C(V){return V.type==="text"?V.offset===V.getNode().getTextContentSize():V.offset===V.getNode().getChildrenSize()}function b(V,B,q){let ie=B.getNode(),H=q;if(e.$isElementNode(ie)){const j=ie.getDescendantByIndex(B.offset);j!==null&&(ie=j)}for(;H>0&&ie!==null;){if(e.$isElementNode(ie)){const T=ie.getLastDescendant();T!==null&&(ie=T)}let j=ie.getPreviousSibling(),Q=0;if(j===null){let T=ie.getParentOrThrow(),P=T.getPreviousSibling();for(;P===null;){if(T=T.getParent(),T===null){j=null;break}P=T.getPreviousSibling()}T!==null&&(Q=T.isInline()?0:2,j=P)}let F=ie.getTextContent();F===""&&e.$isElementNode(ie)&&!ie.isInline()&&(F=`
|
|
93
|
-
|
|
94
|
-
`);const w=F.length;if(!e.$isTextNode(ie)||H>=w){const T=ie.getParent();ie.remove(),T!=null&&T.getChildrenSize()===0&&!e.$isRootNode(T)&&T.remove(),H-=w+Q,ie=j}else{const T=ie.getKey(),P=V.getEditorState().read(()=>{const pe=e.$getNodeByKey(T);return e.$isTextNode(pe)&&pe.isSimpleText()?pe.getTextContent():null}),X=w-H,ue=F.slice(0,X);if(P!==null&&P!==F){const pe=e.$getPreviousSelection();let se=ie;if(ie.isSimpleText())ie.setTextContent(P);else{const Ce=e.$createTextNode(P);ie.replace(Ce),se=Ce}if(e.$isRangeSelection(pe)&&pe.isCollapsed()){const Ce=pe.anchor.offset;se.select(Ce,Ce)}}else if(ie.isSimpleText()){const pe=B.key===T;let se=B.offset;se<H&&(se=w);const Ce=pe?se-H:0,Se=pe?se:X;if(pe&&Ce===0){const[He]=ie.splitText(Ce,Se);He.remove()}else{const[,He]=ie.splitText(Ce,Se);He.remove()}}else{const pe=e.$createTextNode(ue);ie.replace(pe)}H=0}}}function y(V){const B=V.getStyle(),q=a(B);t.set(B,q)}function N(V,B){const q=l("getStyle"in V?V.getStyle():V.style),ie=Object.entries(B).reduce((j,[Q,F])=>(F===null?delete j[Q]:j[Q]=F,j),{...q}),H=u(ie);V.setStyle(H),t.set(H,ie)}function R(V,B){const q=V.getNodes(),ie=q.length;if(e.DEPRECATED_$isGridSelection(V)){const le=e.$createRangeSelection(),ce=le.anchor,ve=le.focus;for(let ke=0;ke<ie;ke++){const Pe=q[ke];e.DEPRECATED_$isGridCellNode(Pe)&&(ce.set(Pe.getKey(),0,"element"),ve.set(Pe.getKey(),Pe.getChildrenSize(),"element"),R(e.$normalizeSelection__EXPERIMENTAL(le),B))}e.$setSelection(V);return}const H=ie-1;let j=q[0],Q=q[H];if(V.isCollapsed()&&e.$isRangeSelection(V)){N(V,B);return}const F=V.anchor,w=V.focus,T=j.getTextContent().length,P=w.offset;let X=F.offset;const ue=F.isBefore(w);let pe=ue?X:P,se=ue?P:X;const Ce=ue?F.type:w.type,Se=ue?w.type:F.type,He=ue?w.key:F.key;if(e.$isTextNode(j)&&pe===T){const le=j.getNextSibling();e.$isTextNode(le)&&(X=0,pe=0,j=le)}if(q.length===1){if(e.$isTextNode(j)){if(pe=Ce==="element"?0:X>P?P:X,se=Se==="element"?T:X>P?X:P,pe===se)return;if(pe===0&&se===T)N(j,B),j.select(pe,se);else{const le=j.splitText(pe,se),ce=pe===0?le[0]:le[1];N(ce,B),ce.select(0,se-pe)}}}else{if(e.$isTextNode(j)&&pe<j.getTextContentSize()&&(pe!==0&&(j=j.splitText(pe)[1],pe=0,F.set(j.getKey(),pe,"text")),N(j,B)),e.$isTextNode(Q)){const le=Q.getTextContent().length;Q.__key!==He&&se!==0&&(se=le),se!==le&&([Q]=Q.splitText(se)),se!==0&&N(Q,B)}for(let le=1;le<H;le++){const ce=q[le],ve=ce.getKey();e.$isTextNode(ce)&&ve!==j.getKey()&&ve!==Q.getKey()&&!ce.isToken()&&N(ce,B)}}}function O(V,B){if(V.anchor.key==="root"){const H=B(),j=e.$getRoot(),Q=j.getFirstChild();Q?Q.replace(H,!0):j.append(H);return}const q=V.getNodes(),ie=he(V.anchor.getNode(),te);ie&&q.indexOf(ie)===-1&&q.push(ie);for(let H=0;H<q.length;H++){const j=q[H];if(!te(j))continue;const Q=B();Q.setFormat(j.getFormatType()),Q.setIndent(j.getIndent()),j.replace(Q,!0)}}function k(V){return V.getNode().isAttached()}function I(V){let B=V;for(;B!==null&&!e.$isRootOrShadowRoot(B);){const q=B.getLatest(),ie=B.getParent();q.getChildrenSize()===0&&B.remove(!0),B=ie}}function M(V,B,q=null){const ie=V.getNodes(),H=ie.length,j=V.anchor;if(H===0||H===1&&j.type==="element"&&j.getNode().getChildrenSize()===0){const w=j.type==="text"?j.getNode().getParentOrThrow():j.getNode(),T=w.getChildren();let P=B();P.setFormat(w.getFormatType()),P.setIndent(w.getIndent()),T.forEach(X=>P.append(X)),q&&(P=q.append(P)),w.replace(P);return}let Q=null,F=[];for(let w=0;w<H;w++){const T=ie[w];e.$isRootOrShadowRoot(T)?(Y(V,F,F.length,B,q),F=[],Q=T):Q===null||Q!==null&&e.$hasAncestor(T,Q)?F.push(T):(Y(V,F,F.length,B,q),F=[T])}Y(V,F,F.length,B,q)}function Y(V,B,q,ie,H=null){if(B.length===0)return;const j=B[0],Q=new Map,F=[];let w=e.$isElementNode(j)?j:j.getParentOrThrow();w.isInline()&&(w=w.getParentOrThrow());let T=!1;for(;w!==null;){const se=w.getPreviousSibling();if(se!==null){w=se,T=!0;break}if(w=w.getParentOrThrow(),e.$isRootOrShadowRoot(w))break}const P=new Set;for(let se=0;se<q;se++){const Ce=B[se];e.$isElementNode(Ce)&&Ce.getChildrenSize()===0&&P.add(Ce.getKey())}const X=new Set;for(let se=0;se<q;se++){const Ce=B[se];let Se=Ce.getParent();if(Se!==null&&Se.isInline()&&(Se=Se.getParent()),Se!==null&&e.$isLeafNode(Ce)&&!X.has(Ce.getKey())){const He=Se.getKey();if(Q.get(He)===void 0){const le=ie();le.setFormat(Se.getFormatType()),le.setIndent(Se.getIndent()),F.push(le),Q.set(He,le),Se.getChildren().forEach(ce=>{le.append(ce),X.add(ce.getKey()),e.$isElementNode(ce)&&ce.getChildrenKeys().forEach(ve=>X.add(ve))}),I(Se)}}else if(P.has(Ce.getKey())){const He=ie();He.setFormat(Ce.getFormatType()),He.setIndent(Ce.getIndent()),F.push(He),Ce.remove(!0)}}if(H!==null)for(let se=0;se<F.length;se++){const Ce=F[se];H.append(Ce)}let ue=null;if(e.$isRootOrShadowRoot(w))if(T)if(H!==null)w.insertAfter(H);else for(let se=F.length-1;se>=0;se--){const Ce=F[se];w.insertAfter(Ce)}else{const se=w.getFirstChild();if(e.$isElementNode(se)&&(w=se),se===null)if(H)w.append(H);else for(let Ce=0;Ce<F.length;Ce++){const Se=F[Ce];w.append(Se),ue=Se}else if(H!==null)se.insertBefore(H);else for(let Ce=0;Ce<F.length;Ce++){const Se=F[Ce];se.insertBefore(Se),ue=Se}}else if(H)w.insertAfter(H);else for(let se=F.length-1;se>=0;se--){const Ce=F[se];w.insertAfter(Ce),ue=Ce}const pe=e.$getPreviousSelection();e.$isRangeSelection(pe)&&k(pe.anchor)&&k(pe.focus)?e.$setSelection(pe.clone()):ue!==null?ue.selectEnd():V.dirty=!0}function ee(V,B){const q=e.$getAdjacentNode(V.focus,B);return e.$isDecoratorNode(q)&&!q.isIsolated()||e.$isElementNode(q)&&!q.isInline()&&!q.canBeEmpty()}function re(V,B,q,ie){V.modify(B?"extend":"move",q,ie)}function Z(V){const B=V.anchor.getNode();return(e.$isRootNode(B)?B:B.getParentOrThrow()).getDirection()==="rtl"}function U(V,B,q){const ie=Z(V);re(V,B,q?!ie:ie,"character")}function J(V){const B=V.anchor,q=V.focus,ie=B.getNode().getTopLevelElementOrThrow().getParentOrThrow();let H=ie.getFirstDescendant(),j=ie.getLastDescendant(),Q="element",F="element",w=0;e.$isTextNode(H)?Q="text":!e.$isElementNode(H)&&H!==null&&(H=H.getParentOrThrow()),e.$isTextNode(j)?(F="text",w=j.getTextContentSize()):!e.$isElementNode(j)&&j!==null&&(j=j.getParentOrThrow()),H&&j&&(B.set(H.getKey(),0,Q),q.set(j.getKey(),w,F))}function fe(V,B,q){const ie=V.getStyle(),H=l(ie);return H!==null&&H[B]||q}function ge(V,B,q=""){let ie=null;const H=V.getNodes(),j=V.anchor,Q=V.focus,F=V.isBackward(),w=F?Q.offset:j.offset,T=F?Q.getNode():j.getNode();if(V.isCollapsed()&&V.style!==""){const P=V.style,X=l(P);if(X!==null&&B in X)return X[B]}for(let P=0;P<H.length;P++){const X=H[P];if(!(P!==0&&w===0&&X.is(T))&&e.$isTextNode(X)){const ue=fe(X,B,q);if(ie===null)ie=ue;else if(ie!==ue){ie="";break}}}return ie===null?q:ie}function te(V){if(e.$isDecoratorNode(V)&&!V.isInline())return!0;if(!e.$isElementNode(V)||e.$isRootOrShadowRoot(V))return!1;const B=V.getFirstChild(),q=B===null||e.$isLineBreakNode(B)||e.$isTextNode(B)||B.isInline();return!V.isInline()&&V.canBeEmpty()!==!1&&q}function he(V,B){let q=V;for(;q!==null&&q.getParent()!==null&&!B(q);)q=q.getParentOrThrow();return B(q)?q:null}return sr.$addNodeStyle=y,sr.$cloneWithProperties=_,sr.$getSelectionStyleValueForProperty=ge,sr.$isAtNodeEnd=C,sr.$isParentElementRTL=Z,sr.$moveCaretSelection=re,sr.$moveCharacter=U,sr.$patchStyleText=R,sr.$selectAll=J,sr.$setBlocksType=O,sr.$shouldOverrideDefaultCharacterSelection=ee,sr.$sliceSelectedTextNodeContent=v,sr.$wrapNodes=M,sr.createDOMRange=o,sr.createRectsFromDOMRange=i,sr.getStyleObjectFromCSS=l,sr.trimTextContentFromAnchor=b,sr}var lr={},gy;function IO(){if(gy)return lr;gy=1;var e=Xt();let t=new Map;function n(b){for(;b!=null;){if(b.nodeType===Node.TEXT_NODE)return b;b=b.firstChild}return null}function r(b){let y=b.parentNode;if(y==null)throw Error("Should never happen");return[y,Array.from(y.childNodes).indexOf(b)]}function o(b){let y={};b=b.split(";");for(let N of b)if(N!==""){let[R,O]=N.split(/:([^]+)/);R&&O&&(y[R.trim()]=O.trim())}return y}function i(b){let y=t.get(b);return y===void 0&&(y=o(b),t.set(b,y)),y}function a(b){let y="";for(let N in b)N&&(y+=`${N}: ${b[N]};`);return y}function l(b,y){var N=i("getStyle"in b?b.getStyle():b.style);y=Object.entries(y).reduce((R,[O,k])=>(k===null?delete R[O]:R[O]=k,R),{...N}),N=a(y),b.setStyle(N),t.set(N,y)}function u(b,y){var N=b.getNodes(),R=N.length;if(e.DEPRECATED_$isGridSelection(b)){for(var O=e.$createRangeSelection(),k=O.anchor,I=O.focus,M=0;M<R;M++){var Y=N[M];e.DEPRECATED_$isGridCellNode(Y)&&(k.set(Y.getKey(),0,"element"),I.set(Y.getKey(),Y.getChildrenSize(),"element"),u(e.$normalizeSelection__EXPERIMENTAL(O),y))}e.$setSelection(b)}else if(--R,O=N[0],k=N[R],b.isCollapsed()&&e.$isRangeSelection(b))l(b,y);else{M=b.anchor;var ee=b.focus;Y=O.getTextContent().length;var re=ee.offset,Z=M.offset,U=M.isBefore(ee);I=U?Z:re,b=U?re:Z;var J=U?M.type:ee.type,fe=U?ee.type:M.type;if(ee=U?ee.key:M.key,e.$isTextNode(O)&&I===Y&&(U=O.getNextSibling(),e.$isTextNode(U)&&(I=Z=0,O=U)),N.length===1)e.$isTextNode(O)&&(I=J==="element"?0:Z>re?re:Z,b=fe==="element"?Y:Z>re?Z:re,I!==b&&(I===0&&b===Y?(l(O,y),O.select(I,b)):(N=O.splitText(I,b),N=I===0?N[0]:N[1],l(N,y),N.select(0,b-I))));else for(e.$isTextNode(O)&&I<O.getTextContentSize()&&(I!==0&&(O=O.splitText(I)[1],I=0,M.set(O.getKey(),I,"text")),l(O,y)),e.$isTextNode(k)&&(I=k.getTextContent().length,k.__key!==ee&&b!==0&&(b=I),b!==I&&([k]=k.splitText(b)),b!==0&&l(k,y)),b=1;b<R;b++)I=N[b],M=I.getKey(),e.$isTextNode(I)&&M!==O.getKey()&&M!==k.getKey()&&!I.isToken()&&l(I,y)}}function p(b){for(;b!==null&&!e.$isRootOrShadowRoot(b);){let y=b.getLatest(),N=b.getParent();y.getChildrenSize()===0&&b.remove(!0),b=N}}function m(b,y,N,R,O=null){if(y.length!==0){var k=y[0],I=new Map,M=[];k=e.$isElementNode(k)?k:k.getParentOrThrow(),k.isInline()&&(k=k.getParentOrThrow());for(var Y=!1;k!==null;){var ee=k.getPreviousSibling();if(ee!==null){k=ee,Y=!0;break}if(k=k.getParentOrThrow(),e.$isRootOrShadowRoot(k))break}ee=new Set;for(var re=0;re<N;re++){var Z=y[re];e.$isElementNode(Z)&&Z.getChildrenSize()===0&&ee.add(Z.getKey())}var U=new Set;for(re=0;re<N;re++){Z=y[re];var J=Z.getParent();if(J!==null&&J.isInline()&&(J=J.getParent()),J!==null&&e.$isLeafNode(Z)&&!U.has(Z.getKey())){if(Z=J.getKey(),I.get(Z)===void 0){let fe=R();fe.setFormat(J.getFormatType()),fe.setIndent(J.getIndent()),M.push(fe),I.set(Z,fe),J.getChildren().forEach(ge=>{fe.append(ge),U.add(ge.getKey()),e.$isElementNode(ge)&&ge.getChildrenKeys().forEach(te=>U.add(te))}),p(J)}}else ee.has(Z.getKey())&&(J=R(),J.setFormat(Z.getFormatType()),J.setIndent(Z.getIndent()),M.push(J),Z.remove(!0))}if(O!==null)for(y=0;y<M.length;y++)O.append(M[y]);if(y=null,e.$isRootOrShadowRoot(k))if(Y)if(O!==null)k.insertAfter(O);else for(O=M.length-1;0<=O;O--)k.insertAfter(M[O]);else if(Y=k.getFirstChild(),e.$isElementNode(Y)&&(k=Y),Y===null)if(O)k.append(O);else for(O=0;O<M.length;O++)Y=M[O],k.append(Y),y=Y;else if(O!==null)Y.insertBefore(O);else for(k=0;k<M.length;k++)O=M[k],Y.insertBefore(O),y=O;else if(O)k.insertAfter(O);else for(O=M.length-1;0<=O;O--)Y=M[O],k.insertAfter(Y),y=Y;M=e.$getPreviousSelection(),e.$isRangeSelection(M)&&M.anchor.getNode().isAttached()&&M.focus.getNode().isAttached()?e.$setSelection(M.clone()):y!==null?y.selectEnd():b.dirty=!0}}function _(b,y,N,R){b.modify(y?"extend":"move",N,R)}function v(b){return b=b.anchor.getNode(),(e.$isRootNode(b)?b:b.getParentOrThrow()).getDirection()==="rtl"}function C(b){if(e.$isDecoratorNode(b)&&!b.isInline())return!0;if(!e.$isElementNode(b)||e.$isRootOrShadowRoot(b))return!1;var y=b.getFirstChild();return y=y===null||e.$isLineBreakNode(y)||e.$isTextNode(y)||y.isInline(),!b.isInline()&&b.canBeEmpty()!==!1&&y}return lr.$addNodeStyle=function(b){b=b.getStyle();let y=o(b);t.set(b,y)},lr.$cloneWithProperties=function(b){let y=b.constructor.clone(b);return y.__parent=b.__parent,y.__next=b.__next,y.__prev=b.__prev,e.$isElementNode(b)&&e.$isElementNode(y)?(y.__first=b.__first,y.__last=b.__last,y.__size=b.__size,y.__format=b.__format,y.__indent=b.__indent,y.__dir=b.__dir,y):(e.$isTextNode(b)&&e.$isTextNode(y)&&(y.__format=b.__format,y.__style=b.__style,y.__mode=b.__mode,y.__detail=b.__detail),y)},lr.$getSelectionStyleValueForProperty=function(b,y,N=""){let R=null,O=b.getNodes();var k=b.anchor,I=b.focus,M=b.isBackward();let Y=M?I.offset:k.offset;if(k=M?I.getNode():k.getNode(),b.isCollapsed()&&b.style!==""&&(b=i(b.style),b!==null&&y in b))return b[y];for(b=0;b<O.length;b++){var ee=O[b];if((b===0||Y!==0||!ee.is(k))&&e.$isTextNode(ee)){if(I=y,M=N,ee=ee.getStyle(),ee=i(ee),I=ee!==null&&ee[I]||M,R===null)R=I;else if(R!==I){R="";break}}}return R===null?N:R},lr.$isAtNodeEnd=function(b){return b.type==="text"?b.offset===b.getNode().getTextContentSize():b.offset===b.getNode().getChildrenSize()},lr.$isParentElementRTL=v,lr.$moveCaretSelection=_,lr.$moveCharacter=function(b,y,N){let R=v(b);_(b,y,N?!R:R,"character")},lr.$patchStyleText=u,lr.$selectAll=function(b){let y=b.anchor;b=b.focus;var N=y.getNode().getTopLevelElementOrThrow().getParentOrThrow();let R=N.getFirstDescendant();N=N.getLastDescendant();let O="element",k="element",I=0;e.$isTextNode(R)?O="text":e.$isElementNode(R)||R===null||(R=R.getParentOrThrow()),e.$isTextNode(N)?(k="text",I=N.getTextContentSize()):e.$isElementNode(N)||N===null||(N=N.getParentOrThrow()),R&&N&&(y.set(R.getKey(),0,O),b.set(N.getKey(),I,k))},lr.$setBlocksType=function(b,y){if(b.anchor.key==="root"){y=y();var N=e.$getRoot();(b=N.getFirstChild())?b.replace(y,!0):N.append(y)}else{for(N=b.getNodes(),b=b.anchor.getNode();b!==null&&b.getParent()!==null&&!C(b);)b=b.getParentOrThrow();for((b=C(b)?b:null)&&N.indexOf(b)===-1&&N.push(b),b=0;b<N.length;b++){let R=N[b];if(!C(R))continue;let O=y();O.setFormat(R.getFormatType()),O.setIndent(R.getIndent()),R.replace(O,!0)}}},lr.$shouldOverrideDefaultCharacterSelection=function(b,y){return b=e.$getAdjacentNode(b.focus,y),e.$isDecoratorNode(b)&&!b.isIsolated()||e.$isElementNode(b)&&!b.isInline()&&!b.canBeEmpty()},lr.$sliceSelectedTextNodeContent=function(b,y){if(y.isSelected()&&!y.isSegmented()&&!y.isToken()&&e.$INTERNAL_isPointSelection(b)){var N=b.anchor.getNode(),R=b.focus.getNode(),O=y.is(N),k=y.is(R);if(O||k){O=b.isBackward();let[I,M]=b.getCharacterOffsets();b=N.is(R),k=y.is(O?R:N),R=y.is(O?N:R),N=0;let Y;b?(N=I>M?M:I,Y=I>M?I:M):k?(N=O?M:I,Y=void 0):R&&(O=O?I:M,N=0,Y=O),y.__text=y.__text.slice(N,Y)}}return y},lr.$wrapNodes=function(b,y,N=null){var R=b.getNodes();let O=R.length;var k=b.anchor;if(O===0||O===1&&k.type==="element"&&k.getNode().getChildrenSize()===0){b=k.type==="text"?k.getNode().getParentOrThrow():k.getNode(),R=b.getChildren();let M=y();M.setFormat(b.getFormatType()),M.setIndent(b.getIndent()),R.forEach(Y=>M.append(Y)),N&&(M=N.append(M)),b.replace(M)}else{k=null;var I=[];for(let M=0;M<O;M++){let Y=R[M];e.$isRootOrShadowRoot(Y)?(m(b,I,I.length,y,N),I=[],k=Y):k===null||k!==null&&e.$hasAncestor(Y,k)?I.push(Y):(m(b,I,I.length,y,N),I=[Y])}m(b,I,I.length,y,N)}},lr.createDOMRange=function(b,y,N,R,O){let k=y.getKey(),I=R.getKey(),M=document.createRange(),Y=b.getElementByKey(k);if(b=b.getElementByKey(I),e.$isTextNode(y)&&(Y=n(Y)),e.$isTextNode(R)&&(b=n(b)),y===void 0||R===void 0||Y===null||b===null)return null;Y.nodeName==="BR"&&([Y,N]=r(Y)),b.nodeName==="BR"&&([b,O]=r(b)),y=Y.firstChild,Y===b&&y!=null&&y.nodeName==="BR"&&N===0&&O===0&&(O=1);try{M.setStart(Y,N),M.setEnd(b,O)}catch{return null}return!M.collapsed||N===O&&k===I||(M.setStart(b,O),M.setEnd(Y,N)),M},lr.createRectsFromDOMRange=function(b,y){var N=b.getRootElement();if(N===null)return[];b=N.getBoundingClientRect(),N=getComputedStyle(N),N=parseFloat(N.paddingLeft)+parseFloat(N.paddingRight),y=Array.from(y.getClientRects());let R=y.length;y.sort((k,I)=>{let M=k.top-I.top;return 3>=Math.abs(M)?k.left-I.left:M});let O;for(let k=0;k<R;k++){let I=y[k],M=I.width+N===b.width;O&&O.top<=I.top&&O.top+O.height>I.top&&O.left+O.width>I.left||M?(y.splice(k--,1),R--):O=I}return y},lr.getStyleObjectFromCSS=i,lr.trimTextContentFromAnchor=function(b,y,N){let R=y.getNode();if(e.$isElementNode(R)){var O=R.getDescendantByIndex(y.offset);O!==null&&(R=O)}for(;0<N&&R!==null;){e.$isElementNode(R)&&(O=R.getLastDescendant(),O!==null&&(R=O));var k=R.getPreviousSibling(),I=0;if(k===null){O=R.getParentOrThrow();for(var M=O.getPreviousSibling();M===null;){if(O=O.getParent(),O===null){k=null;break}M=O.getPreviousSibling()}O!==null&&(I=O.isInline()?0:2,k=M)}if(M=R.getTextContent(),M===""&&e.$isElementNode(R)&&!R.isInline()&&(M=`
|
|
95
|
-
|
|
96
|
-
`),O=M.length,!e.$isTextNode(R)||N>=O)M=R.getParent(),R.remove(),M==null||M.getChildrenSize()!==0||e.$isRootNode(M)||M.remove(),N-=O+I,R=k;else{let Y=R.getKey();I=b.getEditorState().read(()=>{const re=e.$getNodeByKey(Y);return e.$isTextNode(re)&&re.isSimpleText()?re.getTextContent():null}),k=O-N;let ee=M.slice(0,k);I!==null&&I!==M?(N=e.$getPreviousSelection(),O=R,R.isSimpleText()?R.setTextContent(I):(O=e.$createTextNode(I),R.replace(O)),e.$isRangeSelection(N)&&N.isCollapsed()&&(N=N.anchor.offset,O.select(N,N))):R.isSimpleText()?(I=y.key===Y,M=y.offset,M<N&&(M=O),N=I?M-N:0,O=I?M:k,I&&N===0?([N]=R.splitText(N,O),N.remove()):([,N]=R.splitText(N,O),N.remove())):(N=e.$createTextNode(ee),R.replace(N)),N=0}}},lr}var my,vy;function Ha(){return vy||(vy=1,my=process.env.NODE_ENV==="development"?PO():IO()),my}var yy;function LO(){if(yy)return Pn;yy=1;var e=Ha(),t=Xt();function n(...ee){return()=>{ee.forEach(re=>re())}}function r(ee){return`${ee}px`}const o={attributes:!0,characterData:!0,childList:!0,subtree:!0};function i(ee,re,Z){let U=null,J=null,fe=null,ge=[];const te=document.createElement("div");function he(){if(U===null)throw Error("Unexpected null rootDOMNode");if(J===null)throw Error("Unexpected null parentDOMNode");const{left:ie,top:H}=U.getBoundingClientRect(),j=J,Q=e.createRectsFromDOMRange(ee,re);te.isConnected||j.append(te);let F=!1;for(let w=0;w<Q.length;w++){const T=Q[w],P=ge[w]||document.createElement("div"),X=P.style;X.position!=="absolute"&&(X.position="absolute",F=!0);const ue=r(T.left-ie);X.left!==ue&&(X.left=ue,F=!0);const pe=r(T.top-H);X.top!==pe&&(P.style.top=pe,F=!0);const se=r(T.width);X.width!==se&&(P.style.width=se,F=!0);const Ce=r(T.height);X.height!==Ce&&(P.style.height=Ce,F=!0),P.parentNode!==te&&(te.append(P),F=!0),ge[w]=P}for(;ge.length>Q.length;)ge.pop();F&&Z(ge)}function V(){J=null,U=null,fe!==null&&fe.disconnect(),fe=null,te.remove();for(const ie of ge)ie.remove();ge=[]}function B(){const ie=ee.getRootElement();if(ie===null)return V();const H=ie.parentElement;if(!(H instanceof HTMLElement))return V();V(),U=ie,J=H,fe=new MutationObserver(j=>{const Q=ee.getRootElement(),F=Q&&Q.parentElement;if(Q!==U||F!==J)return B();for(const w of j)if(!te.contains(w.target))return he()}),fe.observe(H,o),he()}const q=ee.registerRootListener(B);return()=>{q(),V()}}function a(ee,re){let Z=null,U=null,J=null,fe=null,ge=()=>{};function te(he){he.read(()=>{const V=t.$getSelection();if(!t.$isRangeSelection(V)){Z=null,U=null,J=null,fe=null,ge(),ge=()=>{};return}const{anchor:B,focus:q}=V,ie=B.getNode(),H=ie.getKey(),j=B.offset,Q=q.getNode(),F=Q.getKey(),w=q.offset,T=ee.getElementByKey(H),P=ee.getElementByKey(F),X=Z===null||T===null||j!==U||H!==Z.getKey()||ie!==Z&&(!(Z instanceof t.TextNode)||ie.updateDOM(Z,T,ee._config)),ue=J===null||P===null||w!==fe||F!==J.getKey()||Q!==J&&(!(J instanceof t.TextNode)||Q.updateDOM(J,P,ee._config));if(X||ue){const pe=ee.getElementByKey(B.getNode().getKey()),se=ee.getElementByKey(q.getNode().getKey());if(pe!==null&&se!==null&&pe.tagName==="SPAN"&&se.tagName==="SPAN"){const Ce=document.createRange();let Se,He,le,ce;q.isBefore(B)?(Se=se,He=q.offset,le=pe,ce=B.offset):(Se=pe,He=B.offset,le=se,ce=q.offset);const ve=Se.firstChild;if(ve===null)throw Error("Expected text node to be first child of span");const ke=le.firstChild;if(ke===null)throw Error("Expected text node to be first child of span");Ce.setStart(ve,He),Ce.setEnd(ke,ce),ge(),ge=i(ee,Ce,Pe=>{for(const Fe of Pe){const Qe=Fe.style;Qe.background!=="Highlight"&&(Qe.background="Highlight"),Qe.color!=="HighlightText"&&(Qe.color="HighlightText"),Qe.zIndex!=="-1"&&(Qe.zIndex="-1"),Qe.pointerEvents!=="none"&&(Qe.pointerEvents="none"),Qe.marginTop!==r(-1.5)&&(Qe.marginTop=r(-1.5)),Qe.paddingTop!==r(4)&&(Qe.paddingTop=r(4)),Qe.paddingBottom!==r(0)&&(Qe.paddingBottom=r(0))}re!==void 0&&re(Pe)})}}Z=ie,U=j,J=Q,fe=w})}return te(ee.getEditorState()),n(ee.registerUpdateListener(({editorState:he})=>te(he)),ge,()=>{ge()})}function l(ee,...re){re.forEach(Z=>{if(typeof Z=="string"){const U=Z.split(" ").filter(J=>J!=="");ee.classList.add(...U)}})}function u(ee,...re){re.forEach(Z=>{typeof Z=="string"&&ee.classList.remove(...Z.split(" "))})}function p(ee,re){for(const Z of re)if(ee.type.startsWith(Z))return!0;return!1}function m(ee,re){const Z=ee[Symbol.iterator]();return new Promise((U,J)=>{const fe=[],ge=()=>{const{done:te,value:he}=Z.next();if(te)return U(fe);const V=new FileReader;V.addEventListener("error",J),V.addEventListener("load",()=>{const B=V.result;typeof B=="string"&&fe.push({file:he,result:B}),ge()}),p(he,re)?V.readAsDataURL(he):ge()};ge()})}function _(ee,re){const Z=[],U=(ee||t.$getRoot()).getLatest(),J=re||(t.$isElementNode(U)?U.getLastDescendant():U);let fe=U,ge=v(fe);for(;fe!==null&&!fe.is(J);)if(Z.push({depth:ge,node:fe}),t.$isElementNode(fe)&&fe.getChildrenSize()>0)fe=fe.getFirstChild(),ge++;else{let te=null;for(;te===null&&fe!==null;)te=fe.getNextSibling(),te===null?(fe=fe.getParent(),ge--):fe=te}return fe!==null&&fe.is(J)&&Z.push({depth:ge,node:fe}),Z}function v(ee){let re=ee,Z=0;for(;(re=re.getParent())!==null;)Z++;return Z}function C(ee,re){let Z=ee;for(;Z!=null;){if(Z instanceof re)return Z;Z=Z.getParent()}return null}function b(ee){const re=y(ee,Z=>t.$isElementNode(Z)&&!Z.isInline());if(!t.$isElementNode(re))throw Error(`Expected node ${ee.__key} to have closest block element node.`);return re}function y(ee,re){let Z=ee;for(;Z!==t.$getRoot()&&Z!=null;){if(re(Z))return Z;Z=Z.getParent()}return null}function N(ee,re,Z,U){const J=te=>te instanceof re,fe=te=>{const he=te.getChildren();for(let q=0;q<he.length;q++){const ie=he[q];if(J(ie))return null}let V=te,B=te;for(;V!==null;)if(B=V,V=V.getParent(),J(V))return{child:B,parent:V};return null},ge=te=>{const he=fe(te);if(he!==null){const{child:V,parent:B}=he;if(V.is(te)){U(B,te);const q=V.getNextSiblings(),ie=q.length;if(B.insertAfter(V),ie!==0){const H=Z(B);V.insertAfter(H);for(let j=0;j<ie;j++)H.append(q[j])}!B.canBeEmpty()&&B.getChildrenSize()===0&&B.remove()}}};return ee.registerNodeTransform(re,ge)}function R(ee,re){const Z=new Map,U=ee._pendingEditorState;for(const[fe,ge]of re._nodeMap){const te=e.$cloneWithProperties(ge);t.$isTextNode(te)&&(te.__text=ge.__text),Z.set(fe,te)}U&&(U._nodeMap=Z),ee._dirtyType=2;const J=re._selection;t.$setSelection(J===null?null:J.clone())}function O(ee){const re=t.$getSelection()||t.$getPreviousSelection();if(t.$isRangeSelection(re)){const{focus:Z}=re,U=Z.getNode(),J=Z.offset;if(t.$isRootOrShadowRoot(U)){const fe=U.getChildAtIndex(J);fe==null?U.append(ee):fe.insertBefore(ee),ee.selectNext()}else{let fe,ge;t.$isTextNode(U)?(fe=U.getParentOrThrow(),ge=U.getIndexWithinParent(),J>0&&(ge+=1,U.splitText(J))):(fe=U,ge=J);const[,te]=t.$splitNode(fe,ge);te.insertBefore(ee),te.selectStart()}}else{if(re!=null){const U=re.getNodes();U[U.length-1].getTopLevelElementOrThrow().insertAfter(ee)}else t.$getRoot().append(ee);const Z=t.$createParagraphNode();ee.insertAfter(Z),Z.select()}return ee.getLatest()}function k(ee,re){const Z=re();return ee.replace(Z),Z.append(ee),Z}function I(ee,re){return ee!==null?Object.getPrototypeOf(ee).constructor.name===re.name:!1}function M(ee,re){const Z=[];for(let U=0;U<ee.length;U++){const J=re(ee[U]);J!==null&&Z.push(J)}return Z}function Y(ee,re){const Z=ee.getFirstChild();Z!==null?Z.insertBefore(re):ee.append(re)}return Pn.$splitNode=t.$splitNode,Pn.isHTMLAnchorElement=t.isHTMLAnchorElement,Pn.isHTMLElement=t.isHTMLElement,Pn.$dfs=_,Pn.$filter=M,Pn.$findMatchingParent=y,Pn.$getNearestBlockElementAncestorOrThrow=b,Pn.$getNearestNodeOfType=C,Pn.$insertFirst=Y,Pn.$insertNodeToNearestRoot=O,Pn.$restoreEditorState=R,Pn.$wrapNodeInElement=k,Pn.addClassNamesToElement=l,Pn.isMimeType=p,Pn.markSelection=a,Pn.mediaFileReader=m,Pn.mergeRegister=n,Pn.objectKlassEquals=I,Pn.positionNodeOnRange=i,Pn.registerNestedElementResolver=N,Pn.removeClassNamesFromElement=u,Pn}var In={},by;function FO(){if(by)return In;by=1;var e=Ha(),t=Xt();function n(u){let p=new URLSearchParams;p.append("code",u);for(let m=1;m<arguments.length;m++)p.append("v",arguments[m]);throw Error(`Minified Lexical error #${u}; visit https://lexical.dev/docs/error?${p} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function r(...u){return()=>{u.forEach(p=>p())}}let o={attributes:!0,characterData:!0,childList:!0,subtree:!0};function i(u,p,m){function _(){if(b===null)throw Error("Unexpected null rootDOMNode");if(y===null)throw Error("Unexpected null parentDOMNode");let{left:I,top:M}=b.getBoundingClientRect();var Y=y;let ee=e.createRectsFromDOMRange(u,p);O.isConnected||Y.append(O),Y=!1;for(let U=0;U<ee.length;U++){var re=ee[U];let J=R[U]||document.createElement("div"),fe=J.style;fe.position!=="absolute"&&(fe.position="absolute",Y=!0);var Z=`${re.left-I}px`;fe.left!==Z&&(fe.left=Z,Y=!0),Z=`${re.top-M}px`,fe.top!==Z&&(J.style.top=Z,Y=!0),Z=`${re.width}px`,fe.width!==Z&&(J.style.width=Z,Y=!0),re=`${re.height}px`,fe.height!==re&&(J.style.height=re,Y=!0),J.parentNode!==O&&(O.append(J),Y=!0),R[U]=J}for(;R.length>ee.length;)R.pop();Y&&m(R)}function v(){b=y=null,N!==null&&N.disconnect(),N=null,O.remove();for(let I of R)I.remove();R=[]}function C(){let I=u.getRootElement();if(I===null)return v();let M=I.parentElement;if(!(M instanceof HTMLElement))return v();v(),b=I,y=M,N=new MutationObserver(Y=>{let ee=u.getRootElement(),re=ee&&ee.parentElement;if(ee!==b||re!==y)return C();for(let Z of Y)if(!O.contains(Z.target))return _()}),N.observe(M,o),_()}let b=null,y=null,N=null,R=[],O=document.createElement("div"),k=u.registerRootListener(C);return()=>{k(),v()}}function a(u,p){for(let m of p)if(u.type.startsWith(m))return!0;return!1}function l(u,p){for(;u!==t.$getRoot()&&u!=null;){if(p(u))return u;u=u.getParent()}return null}return In.$splitNode=t.$splitNode,In.isHTMLAnchorElement=t.isHTMLAnchorElement,In.isHTMLElement=t.isHTMLElement,In.$dfs=function(u,p){let m=[];u=(u||t.$getRoot()).getLatest(),p=p||(t.$isElementNode(u)?u.getLastDescendant():u);for(var _=u,v=0;(_=_.getParent())!==null;)v++;for(_=v;u!==null&&!u.is(p);)if(m.push({depth:_,node:u}),t.$isElementNode(u)&&0<u.getChildrenSize())u=u.getFirstChild(),_++;else for(v=null;v===null&&u!==null;)v=u.getNextSibling(),v===null?(u=u.getParent(),_--):u=v;return u!==null&&u.is(p)&&m.push({depth:_,node:u}),m},In.$filter=function(u,p){let m=[];for(let _=0;_<u.length;_++){let v=p(u[_]);v!==null&&m.push(v)}return m},In.$findMatchingParent=l,In.$getNearestBlockElementAncestorOrThrow=function(u){let p=l(u,m=>t.$isElementNode(m)&&!m.isInline());return t.$isElementNode(p)||n(4,u.__key),p},In.$getNearestNodeOfType=function(u,p){for(;u!=null;){if(u instanceof p)return u;u=u.getParent()}return null},In.$insertFirst=function(u,p){let m=u.getFirstChild();m!==null?m.insertBefore(p):u.append(p)},In.$insertNodeToNearestRoot=function(u){var p=t.$getSelection()||t.$getPreviousSelection();if(t.$isRangeSelection(p)){var{focus:m}=p;if(p=m.getNode(),m=m.offset,t.$isRootOrShadowRoot(p))m=p.getChildAtIndex(m),m==null?p.append(u):m.insertBefore(u),u.selectNext();else{let _,v;t.$isTextNode(p)?(_=p.getParentOrThrow(),v=p.getIndexWithinParent(),0<m&&(v+=1,p.splitText(m))):(_=p,v=m),[,p]=t.$splitNode(_,v),p.insertBefore(u),p.selectStart()}}else p!=null?(p=p.getNodes(),p[p.length-1].getTopLevelElementOrThrow().insertAfter(u)):t.$getRoot().append(u),p=t.$createParagraphNode(),u.insertAfter(p),p.select();return u.getLatest()},In.$restoreEditorState=function(u,p){let m=new Map,_=u._pendingEditorState;for(let[v,C]of p._nodeMap){let b=e.$cloneWithProperties(C);t.$isTextNode(b)&&(b.__text=C.__text),m.set(v,b)}_&&(_._nodeMap=m),u._dirtyType=2,u=p._selection,t.$setSelection(u===null?null:u.clone())},In.$wrapNodeInElement=function(u,p){return p=p(),u.replace(p),p.append(u),p},In.addClassNamesToElement=function(u,...p){p.forEach(m=>{typeof m=="string"&&(m=m.split(" ").filter(_=>_!==""),u.classList.add(...m))})},In.isMimeType=a,In.markSelection=function(u,p){function m(N){N.read(()=>{var R=t.$getSelection();if(t.$isRangeSelection(R)){var{anchor:O,focus:k}=R;R=O.getNode();var I=R.getKey(),M=O.offset,Y=k.getNode(),ee=Y.getKey(),re=k.offset,Z=u.getElementByKey(I),U=u.getElementByKey(ee);if(I=_===null||Z===null||M!==v||I!==_.getKey()||R!==_&&(!(_ instanceof t.TextNode)||R.updateDOM(_,Z,u._config)),ee=C===null||U===null||re!==b||ee!==C.getKey()||Y!==C&&(!(C instanceof t.TextNode)||Y.updateDOM(C,U,u._config)),I||ee){Z=u.getElementByKey(O.getNode().getKey());var J=u.getElementByKey(k.getNode().getKey());if(Z!==null&&J!==null&&Z.tagName==="SPAN"&&J.tagName==="SPAN"){if(ee=document.createRange(),k.isBefore(O)?(I=J,U=k.offset,J=Z,Z=O.offset):(I=Z,U=O.offset,Z=k.offset),I=I.firstChild,I===null||(J=J.firstChild,J===null))throw Error("Expected text node to be first child of span");ee.setStart(I,U),ee.setEnd(J,Z),y(),y=i(u,ee,fe=>{for(let ge of fe){let te=ge.style;te.background!=="Highlight"&&(te.background="Highlight"),te.color!=="HighlightText"&&(te.color="HighlightText"),te.zIndex!=="-1"&&(te.zIndex="-1"),te.pointerEvents!=="none"&&(te.pointerEvents="none"),te.marginTop!=="-1.5px"&&(te.marginTop="-1.5px"),te.paddingTop!=="4px"&&(te.paddingTop="4px"),te.paddingBottom!=="0px"&&(te.paddingBottom="0px")}p!==void 0&&p(fe)})}}_=R,v=M,C=Y,b=re}else b=C=v=_=null,y(),y=()=>{}})}let _=null,v=null,C=null,b=null,y=()=>{};return m(u.getEditorState()),r(u.registerUpdateListener(({editorState:N})=>m(N)),y,()=>{y()})},In.mediaFileReader=function(u,p){let m=u[Symbol.iterator]();return new Promise((_,v)=>{let C=[],b=()=>{const{done:y,value:N}=m.next();if(y)return _(C);const R=new FileReader;R.addEventListener("error",v),R.addEventListener("load",()=>{const O=R.result;typeof O=="string"&&C.push({file:N,result:O}),b()}),a(N,p)?R.readAsDataURL(N):b()};b()})},In.mergeRegister=r,In.objectKlassEquals=function(u,p){return u!==null?Object.getPrototypeOf(u).constructor.name===p.name:!1},In.positionNodeOnRange=i,In.registerNestedElementResolver=function(u,p,m,_){return u.registerNodeTransform(p,v=>{e:{for(var C=v.getChildren(),b=0;b<C.length;b++)if(C[b]instanceof p){C=null;break e}for(C=v;C!==null;)if(b=C,C=C.getParent(),C instanceof p){C={child:b,parent:C};break e}C=null}if(C!==null){const{child:y,parent:N}=C;if(y.is(v)){if(_(N,v),v=y.getNextSiblings(),C=v.length,N.insertAfter(y),C!==0){b=m(N),y.insertAfter(b);for(let R=0;R<C;R++)b.append(v[R])}N.canBeEmpty()||N.getChildrenSize()!==0||N.remove()}}})},In.removeClassNamesFromElement=function(u,...p){p.forEach(m=>{typeof m=="string"&&u.classList.remove(...m.split(" "))})},In}var _y,xy;function vn(){return xy||(xy=1,_y=process.env.NODE_ENV==="development"?LO():FO()),_y}var Ph={},Ey;function jO(){if(Ey)return Ph;Ey=1;var e=Xt();function t(n){const r=window.location.origin,o=i=>{if(i.origin!==r)return;const a=n.getRootElement();if(document.activeElement!==a)return;const l=i.data;if(typeof l=="string"){let u;try{u=JSON.parse(l)}catch{return}if(u&&u.protocol==="nuanria_messaging"&&u.type==="request"){const p=u.payload;if(p&&p.functionId==="makeChanges"){const m=p.args;if(m){const[_,v,C,b,y,N]=m;n.update(()=>{const R=e.$getSelection();if(e.$isRangeSelection(R)){const O=R.anchor;let k=O.getNode(),I=0,M=0;if(e.$isTextNode(k)&&_>=0&&v>=0&&(I=_,M=_+v,R.setTextNodeRange(k,I,k,M)),(I!==M||C!=="")&&(R.insertRawText(C),k=O.getNode()),e.$isTextNode(k)){I=b,M=b+y;const Y=k.getTextContentSize();I=I>Y?Y:I,M=M>Y?Y:M,R.setTextNodeRange(k,I,k,M)}i.stopImmediatePropagation()}})}}}}};return window.addEventListener("message",o,!0),()=>{window.removeEventListener("message",o,!0)}}return Ph.registerDragonSupport=t,Ph}var Ih={},Cy;function BO(){if(Cy)return Ih;Cy=1;var e=Xt();return Ih.registerDragonSupport=function(t){let n=window.location.origin,r=o=>{if(o.origin===n){var i=t.getRootElement();if(document.activeElement===i&&(i=o.data,typeof i=="string")){try{var a=JSON.parse(i)}catch{return}if(a&&a.protocol==="nuanria_messaging"&&a.type==="request"&&(a=a.payload)&&a.functionId==="makeChanges"&&(a=a.args)){const[l,u,p,m,_]=a;t.update(()=>{const v=e.$getSelection();if(e.$isRangeSelection(v)){var C=v.anchor;let b=C.getNode(),y=0,N=0;e.$isTextNode(b)&&0<=l&&0<=u&&(y=l,N=l+u,v.setTextNodeRange(b,y,b,N)),(y!==N||p!=="")&&(v.insertRawText(p),b=C.getNode()),e.$isTextNode(b)&&(y=m,N=m+_,C=b.getTextContentSize(),y=y>C?C:y,N=N>C?C:N,v.setTextNodeRange(b,y,b,N)),o.stopImmediatePropagation()}})}}}};return window.addEventListener("message",r,!0),()=>{window.removeEventListener("message",r,!0)}},Ih}var wy,Ny;function Xx(){return Ny||(Ny=1,wy=process.env.NODE_ENV==="development"?jO():BO()),wy}var ko={},ui={},Od={},Ty;function HO(){if(Ty)return Od;Ty=1;var e=Ha(),t=vn(),n=Xt();function r(p,m){const _=m.body?m.body.childNodes:[];let v=[];for(let C=0;C<_.length;C++){const b=_[C];if(!l.has(b.nodeName)){const y=u(b,p);y!==null&&(v=v.concat(y))}}return v}function o(p,m){if(typeof document>"u"||typeof window>"u")throw new Error("To use $generateHtmlFromNodes in headless mode please initialize a headless browser implementation such as JSDom before calling this function.");const _=document.createElement("div"),v=n.$getRoot().getChildren();for(let C=0;C<v.length;C++){const b=v[C];i(p,b,_,m)}return _.innerHTML}function i(p,m,_,v=null){let C=v!=null?m.isSelected(v):!0;const b=n.$isElementNode(m)&&m.excludeFromCopy("html");let y=m;if(v!==null){let Y=e.$cloneWithProperties(m);Y=n.$isTextNode(Y)&&v!=null?e.$sliceSelectedTextNodeContent(v,Y):Y,y=Y}const N=n.$isElementNode(y)?y.getChildren():[],R=p._nodes.get(y.getType());let O;R&&R.exportDOM!==void 0?O=R.exportDOM(p,y):O=y.exportDOM(p);const{element:k,after:I}=O;if(!k)return!1;const M=document.createDocumentFragment();for(let Y=0;Y<N.length;Y++){const ee=N[Y],re=i(p,ee,M,v);!C&&n.$isElementNode(m)&&re&&m.extractWithChild(ee,v,"html")&&(C=!0)}if(C&&!b){if(t.isHTMLElement(k)&&k.append(M),_.append(k),I){const Y=I.call(y,k);Y&&k.replaceWith(Y)}}else _.append(M);return C}function a(p,m){const{nodeName:_}=p,v=m._htmlConversions.get(_.toLowerCase());let C=null;if(v!==void 0)for(const b of v){const y=b(p);y!==null&&(C===null||C.priority<y.priority)&&(C=y)}return C!==null?C.conversion:null}const l=new Set(["STYLE","SCRIPT"]);function u(p,m,_=new Map,v){let C=[];if(l.has(p.nodeName))return C;let b=null;const y=a(p,m),N=y?y(p):null;let R=null;if(N!==null){R=N.after;const I=N.node;if(b=Array.isArray(I)?I[I.length-1]:I,b!==null){for(const[,M]of _)if(b=M(b,v),!b)break;b&&C.push(...Array.isArray(I)?I:[b])}N.forChild!=null&&_.set(p.nodeName,N.forChild)}const O=p.childNodes;let k=[];for(let I=0;I<O.length;I++)k.push(...u(O[I],m,new Map(_),b));return R!=null&&(k=R(k)),b==null?C=C.concat(k):n.$isElementNode(b)&&b.append(...k),C}return Od.$generateHtmlFromNodes=o,Od.$generateNodesFromDOM=r,Od}var Ad={},Sy;function WO(){if(Sy)return Ad;Sy=1;var e=Ha(),t=vn(),n=Xt();function r(a,l,u,p=null){let m=p!=null?l.isSelected(p):!0,_=n.$isElementNode(l)&&l.excludeFromCopy("html");var v=l;p!==null&&(v=e.$cloneWithProperties(l),v=n.$isTextNode(v)&&p!=null?e.$sliceSelectedTextNodeContent(p,v):v);let C=n.$isElementNode(v)?v.getChildren():[];var b=a._nodes.get(v.getType());b=b&&b.exportDOM!==void 0?b.exportDOM(a,v):v.exportDOM(a);let{element:y,after:N}=b;if(!y)return!1;b=document.createDocumentFragment();for(let R=0;R<C.length;R++){let O=C[R],k=r(a,O,b,p);!m&&n.$isElementNode(l)&&k&&l.extractWithChild(O,p,"html")&&(m=!0)}return m&&!_?(t.isHTMLElement(y)&&y.append(b),u.append(y),N&&(a=N.call(v,y))&&y.replaceWith(a)):u.append(b),m}let o=new Set(["STYLE","SCRIPT"]);function i(a,l,u=new Map,p){let m=[];if(o.has(a.nodeName))return m;let _=null;var v,{nodeName:C}=a,b=l._htmlConversions.get(C.toLowerCase());if(C=null,b!==void 0)for(v of b)b=v(a),b!==null&&(C===null||C.priority<b.priority)&&(C=b);if(C=(v=C!==null?C.conversion:null)?v(a):null,v=null,C!==null){if(v=C.after,b=C.node,_=Array.isArray(b)?b[b.length-1]:b,_!==null){for(var[,y]of u)if(_=y(_,p),!_)break;_&&m.push(...Array.isArray(b)?b:[_])}C.forChild!=null&&u.set(a.nodeName,C.forChild)}for(a=a.childNodes,p=[],y=0;y<a.length;y++)p.push(...i(a[y],l,new Map(u),_));return v!=null&&(p=v(p)),_==null?m=m.concat(p):n.$isElementNode(_)&&_.append(...p),m}return Ad.$generateHtmlFromNodes=function(a,l){if(typeof document>"u"||typeof window>"u")throw Error("To use $generateHtmlFromNodes in headless mode please initialize a headless browser implementation such as JSDom before calling this function.");let u=document.createElement("div"),p=n.$getRoot().getChildren();for(let m=0;m<p.length;m++)r(a,p[m],u,l);return u.innerHTML},Ad.$generateNodesFromDOM=function(a,l){l=l.body?l.body.childNodes:[];let u=[];for(let m=0;m<l.length;m++){var p=l[m];o.has(p.nodeName)||(p=i(p,a),p!==null&&(u=u.concat(p)))}return u},Ad}var Oy,Ay;function Qx(){return Ay||(Ay=1,Oy=process.env.NODE_ENV==="development"?HO():WO()),Oy}var Ry;function zO(){if(Ry)return ui;Ry=1;var e=Qx(),t=Ha(),n=vn(),r=Xt();const o=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",i=I=>o?(I||window).getSelection():null;function a(I){const M=r.$getSelection();if(M==null)throw Error("Expected valid LexicalSelection");return r.$isRangeSelection(M)&&M.isCollapsed()||M.getNodes().length===0?"":e.$generateHtmlFromNodes(I,M)}function l(I){const M=r.$getSelection();if(M==null)throw Error("Expected valid LexicalSelection");return r.$isRangeSelection(M)&&M.isCollapsed()||M.getNodes().length===0?null:JSON.stringify(b(I,M))}function u(I,M){const Y=I.getData("text/plain")||I.getData("text/uri-list");Y!=null&&M.insertRawText(Y)}function p(I,M,Y){const ee=I.getData("application/x-lexical-editor");if(ee)try{const U=JSON.parse(ee);if(U.namespace===Y._config.namespace&&Array.isArray(U.nodes)){const J=y(U.nodes);return m(Y,J,M)}}catch{}const re=I.getData("text/html");if(re)try{const U=new DOMParser().parseFromString(re,"text/html"),J=e.$generateNodesFromDOM(Y,U);return m(Y,J,M)}catch{}const Z=I.getData("text/plain")||I.getData("text/uri-list");if(Z!=null)if(r.$isRangeSelection(M)){const U=Z.split(/(\r?\n|\t)/);U[U.length-1]===""&&U.pop();for(let J=0;J<U.length;J++){const fe=U[J];fe===`
|
|
97
|
-
`||fe===`\r
|
|
98
|
-
`?M.insertParagraph():fe===" "?M.insertNodes([r.$createTabNode()]):M.insertText(fe)}}else M.insertRawText(Z)}function m(I,M,Y){const ee=r.DEPRECATED_$isGridSelection(Y),re=r.$isRangeSelection(Y);if((ee||re&&n.$findMatchingParent(Y.anchor.getNode(),Z=>r.DEPRECATED_$isGridCellNode(Z))!==null&&n.$findMatchingParent(Y.focus.getNode(),Z=>r.DEPRECATED_$isGridCellNode(Z))!==null)&&M.length===1&&r.DEPRECATED_$isGridNode(M[0])){_(M,Y,!1,I);return}Y.insertNodes(M)}function _(I,M,Y,ee){if(I.length!==1||!r.DEPRECATED_$isGridNode(I[0]))throw Error("$mergeGridNodesStrategy: Expected Grid insertion.");const re=I[0],Z=re.getChildren(),U=re.getFirstChildOrThrow().getChildrenSize(),J=re.getChildrenSize(),fe=n.$findMatchingParent(M.anchor.getNode(),X=>r.DEPRECATED_$isGridCellNode(X)),ge=fe&&n.$findMatchingParent(fe,X=>r.DEPRECATED_$isGridRowNode(X)),te=ge&&n.$findMatchingParent(ge,X=>r.DEPRECATED_$isGridNode(X));if(!r.DEPRECATED_$isGridCellNode(fe)||!r.DEPRECATED_$isGridRowNode(ge)||!r.DEPRECATED_$isGridNode(te))throw Error("$mergeGridNodesStrategy: Expected selection to be inside of a Grid.");const he=ge.getIndexWithinParent(),V=Math.min(te.getChildrenSize()-1,he+J-1),B=fe.getIndexWithinParent(),q=Math.min(ge.getChildrenSize()-1,B+U-1),ie=Math.min(B,q),H=Math.min(he,V),j=Math.max(B,q),Q=Math.max(he,V),F=te.getChildren();let w=0,T,P;for(let X=H;X<=Q;X++){const ue=F[X];if(!r.DEPRECATED_$isGridRowNode(ue))throw Error("getNodes: expected to find GridRowNode");const pe=Z[w];if(!r.DEPRECATED_$isGridRowNode(pe))throw Error("getNodes: expected to find GridRowNode");const se=ue.getChildren(),Ce=pe.getChildren();let Se=0;for(let He=ie;He<=j;He++){const le=se[He];if(!r.DEPRECATED_$isGridCellNode(le))throw Error("getNodes: expected to find GridCellNode");const ce=Ce[Se];if(!r.DEPRECATED_$isGridCellNode(ce))throw Error("getNodes: expected to find GridCellNode");X===H&&He===ie?T=le.getKey():X===Q&&He===j&&(P=le.getKey());const ve=le.getChildren();ce.getChildren().forEach(ke=>{r.$isTextNode(ke)&&r.$createParagraphNode().append(ke),le.append(ke)}),ve.forEach(ke=>ke.remove()),Se++}w++}if(T&&P){const X=r.DEPRECATED_$createGridSelection();X.set(te.getKey(),T,P),r.$setSelection(X),ee.dispatchCommand(r.SELECTION_CHANGE_COMMAND,void 0)}}function v(I){const M=I.exportJSON(),Y=I.constructor;if(M.type!==Y.getType())throw Error(`LexicalNode: Node ${Y.name} does not implement .exportJSON().`);const ee=M.children;if(r.$isElementNode(I)&&!Array.isArray(ee))throw Error(`LexicalNode: Node ${Y.name} is an element but .exportJSON() does not have a children array.`);return M}function C(I,M,Y,ee=[]){let re=M!=null?Y.isSelected(M):!0;const Z=r.$isElementNode(Y)&&Y.excludeFromCopy("html");let U=Y;if(M!==null){let ge=t.$cloneWithProperties(Y);ge=r.$isTextNode(ge)&&M!=null?t.$sliceSelectedTextNodeContent(M,ge):ge,U=ge}const J=r.$isElementNode(U)?U.getChildren():[],fe=v(U);if(r.$isTextNode(U)){const ge=U.__text;ge.length>0?fe.text=ge:re=!1}for(let ge=0;ge<J.length;ge++){const te=J[ge],he=C(I,M,te,fe.children);!re&&r.$isElementNode(Y)&&he&&Y.extractWithChild(te,M,"clone")&&(re=!0)}if(re&&!Z)ee.push(fe);else if(Array.isArray(fe.children))for(let ge=0;ge<fe.children.length;ge++){const te=fe.children[ge];ee.push(te)}return re}function b(I,M){const Y=[],ee=r.$getRoot().getChildren();for(let re=0;re<ee.length;re++){const Z=ee[re];C(I,M,Z,Y)}return{namespace:I._config.namespace,nodes:Y}}function y(I){const M=[];for(let Y=0;Y<I.length;Y++){const ee=I[Y],re=r.$parseSerializedNode(ee);r.$isTextNode(re)&&t.$addNodeStyle(re),M.push(re)}return M}const N=50;let R=null;async function O(I,M){if(R!==null)return!1;if(M!==null)return new Promise((J,fe)=>{I.update(()=>{J(k(I,M))})});const Y=I.getRootElement(),ee=I._window==null?window.document:I._window.document,re=i(I._window);if(Y===null||re===null)return!1;const Z=ee.createElement("span");Z.style.cssText="position: fixed; top: -1000px;",Z.append(ee.createTextNode("#")),Y.append(Z);const U=new Range;return U.setStart(Z,0),U.setEnd(Z,1),re.removeAllRanges(),re.addRange(U),new Promise((J,fe)=>{const ge=I.registerCommand(r.COPY_COMMAND,te=>(n.objectKlassEquals(te,ClipboardEvent)&&(ge(),R!==null&&(window.clearTimeout(R),R=null),J(k(I,te))),!0),r.COMMAND_PRIORITY_CRITICAL);R=window.setTimeout(()=>{ge(),R=null,J(!1)},N),ee.execCommand("copy"),Z.remove()})}function k(I,M){const Y=i(I._window);if(!Y)return!1;const ee=Y.anchorNode,re=Y.focusNode;if(ee!==null&&re!==null&&!r.isSelectionWithinEditor(I,ee,re))return!1;M.preventDefault();const Z=M.clipboardData,U=r.$getSelection();if(Z===null||U===null)return!1;const J=a(I),fe=l(I);let ge="";return U!==null&&(ge=U.getTextContent()),J!==null&&Z.setData("text/html",J),fe!==null&&Z.setData("application/x-lexical-editor",fe),Z.setData("text/plain",ge),!0}return ui.$generateJSONFromSelectedNodes=b,ui.$generateNodesFromSerializedNodes=y,ui.$getHtmlContent=a,ui.$getLexicalContent=l,ui.$insertDataTransferForPlainText=u,ui.$insertDataTransferForRichText=p,ui.$insertGeneratedNodes=m,ui.copyToClipboard=O,ui}var di={},$y;function KO(){if($y)return di;$y=1;var e=Qx(),t=Ha(),n=vn(),r=Xt();function o(y){let N=new URLSearchParams;N.append("code",y);for(let R=1;R<arguments.length;R++)N.append("v",arguments[R]);throw Error(`Minified Lexical error #${y}; visit https://lexical.dev/docs/error?${N} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}let i=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function a(y){let N=r.$getSelection();if(N==null)throw Error("Expected valid LexicalSelection");return r.$isRangeSelection(N)&&N.isCollapsed()||N.getNodes().length===0?"":e.$generateHtmlFromNodes(y,N)}function l(y){let N=r.$getSelection();if(N==null)throw Error("Expected valid LexicalSelection");return r.$isRangeSelection(N)&&N.isCollapsed()||N.getNodes().length===0?null:JSON.stringify(_(y,N))}function u(y,N,R){let O=r.DEPRECATED_$isGridSelection(R),k=r.$isRangeSelection(R);(O||k&&n.$findMatchingParent(R.anchor.getNode(),I=>r.DEPRECATED_$isGridCellNode(I))!==null&&n.$findMatchingParent(R.focus.getNode(),I=>r.DEPRECATED_$isGridCellNode(I))!==null)&&N.length===1&&r.DEPRECATED_$isGridNode(N[0])?p(N,R,!1,y):R.insertNodes(N)}function p(y,N,R,O){y.length===1&&r.DEPRECATED_$isGridNode(y[0])||o(42);var k=y[0];y=k.getChildren(),R=k.getFirstChildOrThrow().getChildrenSize();var I=k.getChildrenSize(),M=n.$findMatchingParent(N.anchor.getNode(),fe=>r.DEPRECATED_$isGridCellNode(fe));N=(k=M&&n.$findMatchingParent(M,fe=>r.DEPRECATED_$isGridRowNode(fe)))&&n.$findMatchingParent(k,fe=>r.DEPRECATED_$isGridNode(fe)),r.DEPRECATED_$isGridCellNode(M)&&r.DEPRECATED_$isGridRowNode(k)&&r.DEPRECATED_$isGridNode(N)||o(43);var Y=k.getIndexWithinParent(),ee=Math.min(N.getChildrenSize()-1,Y+I-1);I=M.getIndexWithinParent(),M=Math.min(k.getChildrenSize()-1,I+R-1),R=Math.min(I,M),k=Math.min(Y,ee),I=Math.max(I,M),Y=Math.max(Y,ee),ee=N.getChildren(),M=0;let re,Z;for(let fe=k;fe<=Y;fe++){var U=ee[fe];r.DEPRECATED_$isGridRowNode(U)||o(24);var J=y[M];r.DEPRECATED_$isGridRowNode(J)||o(24),U=U.getChildren(),J=J.getChildren();let ge=0;for(let te=R;te<=I;te++){let he=U[te];r.DEPRECATED_$isGridCellNode(he)||o(25);let V=J[ge];r.DEPRECATED_$isGridCellNode(V)||o(25),fe===k&&te===R?re=he.getKey():fe===Y&&te===I&&(Z=he.getKey());let B=he.getChildren();V.getChildren().forEach(q=>{r.$isTextNode(q)&&r.$createParagraphNode().append(q),he.append(q)}),B.forEach(q=>q.remove()),ge++}M++}re&&Z&&(y=r.DEPRECATED_$createGridSelection(),y.set(N.getKey(),re,Z),r.$setSelection(y),O.dispatchCommand(r.SELECTION_CHANGE_COMMAND,void 0))}function m(y,N,R,O=[]){let k=N!=null?R.isSelected(N):!0,I=r.$isElementNode(R)&&R.excludeFromCopy("html");var M=R;if(N!==null){var Y=t.$cloneWithProperties(R);M=Y=r.$isTextNode(Y)&&N!=null?t.$sliceSelectedTextNodeContent(N,Y):Y}let ee=r.$isElementNode(M)?M.getChildren():[];var re=M;Y=re.exportJSON();var Z=re.constructor;Y.type!==Z.getType()&&o(58,Z.name);let U=Y.children;for(r.$isElementNode(re)&&(Array.isArray(U)||o(59,Z.name)),r.$isTextNode(M)&&(M=M.__text,0<M.length?Y.text=M:k=!1),M=0;M<ee.length;M++)re=ee[M],Z=m(y,N,re,Y.children),!k&&r.$isElementNode(R)&&Z&&R.extractWithChild(re,N,"clone")&&(k=!0);if(k&&!I)O.push(Y);else if(Array.isArray(Y.children))for(y=0;y<Y.children.length;y++)O.push(Y.children[y]);return k}function _(y,N){let R=[],O=r.$getRoot().getChildren();for(let k=0;k<O.length;k++)m(y,N,O[k],R);return{namespace:y._config.namespace,nodes:R}}function v(y){let N=[];for(let R=0;R<y.length;R++){let O=r.$parseSerializedNode(y[R]);r.$isTextNode(O)&&t.$addNodeStyle(O),N.push(O)}return N}let C=null;function b(y,N){var R=i?(y._window||window).getSelection():null;if(!R)return!1;var O=R.anchorNode;if(R=R.focusNode,O!==null&&R!==null&&!r.isSelectionWithinEditor(y,O,R)||(N.preventDefault(),N=N.clipboardData,O=r.$getSelection(),N===null||O===null))return!1;R=a(y),y=l(y);let k="";return O!==null&&(k=O.getTextContent()),R!==null&&N.setData("text/html",R),y!==null&&N.setData("application/x-lexical-editor",y),N.setData("text/plain",k),!0}return di.$generateJSONFromSelectedNodes=_,di.$generateNodesFromSerializedNodes=v,di.$getHtmlContent=a,di.$getLexicalContent=l,di.$insertDataTransferForPlainText=function(y,N){y=y.getData("text/plain")||y.getData("text/uri-list"),y!=null&&N.insertRawText(y)},di.$insertDataTransferForRichText=function(y,N,R){var O=y.getData("application/x-lexical-editor");if(O)try{let I=JSON.parse(O);if(I.namespace===R._config.namespace&&Array.isArray(I.nodes)){let M=v(I.nodes);return u(R,M,N)}}catch{}if(O=y.getData("text/html"))try{var k=new DOMParser().parseFromString(O,"text/html");let I=e.$generateNodesFromDOM(R,k);return u(R,I,N)}catch{}if(y=y.getData("text/plain")||y.getData("text/uri-list"),y!=null)if(r.$isRangeSelection(N))for(y=y.split(/(\r?\n|\t)/),y[y.length-1]===""&&y.pop(),R=0;R<y.length;R++)k=y[R],k===`
|
|
99
|
-
`||k===`\r
|
|
100
|
-
`?N.insertParagraph():k===" "?N.insertNodes([r.$createTabNode()]):N.insertText(k);else N.insertRawText(y)},di.$insertGeneratedNodes=u,di.copyToClipboard=async function(y,N){if(C!==null)return!1;if(N!==null)return new Promise(M=>{y.update(()=>{M(b(y,N))})});var R=y.getRootElement();let O=y._window==null?window.document:y._window.document,k=i?(y._window||window).getSelection():null;if(R===null||k===null)return!1;let I=O.createElement("span");return I.style.cssText="position: fixed; top: -1000px;",I.append(O.createTextNode("#")),R.append(I),R=new Range,R.setStart(I,0),R.setEnd(I,1),k.removeAllRanges(),k.addRange(R),new Promise(M=>{let Y=y.registerCommand(r.COPY_COMMAND,ee=>(n.objectKlassEquals(ee,ClipboardEvent)&&(Y(),C!==null&&(window.clearTimeout(C),C=null),M(b(y,ee))),!0),r.COMMAND_PRIORITY_CRITICAL);C=window.setTimeout(()=>{Y(),C=null,M(!1)},50),O.execCommand("copy"),I.remove()})},di}var Dy,My;function eE(){return My||(My=1,Dy=process.env.NODE_ENV==="development"?zO():KO()),Dy}var ky;function GO(){if(ky)return ko;ky=1;var e=eE(),t=Ha(),n=vn(),r=Xt();function o(ge,te){if(typeof document.caretRangeFromPoint<"u"){const he=document.caretRangeFromPoint(ge,te);return he===null?null:{node:he.startContainer,offset:he.startOffset}}else if(document.caretPositionFromPoint!=="undefined"){const he=document.caretPositionFromPoint(ge,te);return he===null?null:{node:he.offsetNode,offset:he.offset}}else return null}const i=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",a=i&&"documentMode"in document?document.documentMode:null,l=i&&"InputEvent"in window&&!a?"getTargetRanges"in new window.InputEvent("input"):!1,u=i&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),p=i&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,m=i&&/^(?=.*Chrome).*/i.test(navigator.userAgent),_=i&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&!m,v=r.createCommand("DRAG_DROP_PASTE_FILE");class C extends r.ElementNode{static getType(){return"quote"}static clone(te){return new C(te.__key)}constructor(te){super(te)}createDOM(te){const he=document.createElement("blockquote");return n.addClassNamesToElement(he,te.theme.quote),he}updateDOM(te,he){return!1}static importDOM(){return{blockquote:te=>({conversion:k,priority:0})}}exportDOM(te){const{element:he}=super.exportDOM(te);if(he&&n.isHTMLElement(he)){this.isEmpty()&&he.append(document.createElement("br"));const V=this.getFormatType();he.style.textAlign=V;const B=this.getDirection();B&&(he.dir=B)}return{element:he}}static importJSON(te){const he=b();return he.setFormat(te.format),he.setIndent(te.indent),he.setDirection(te.direction),he}exportJSON(){return{...super.exportJSON(),type:"quote"}}insertNewAfter(te,he){const V=r.$createParagraphNode(),B=this.getDirection();return V.setDirection(B),this.insertAfter(V,he),V}collapseAtStart(){const te=r.$createParagraphNode();return this.getChildren().forEach(he=>te.append(he)),this.replace(te),!0}}function b(){return r.$applyNodeReplacement(new C)}function y(ge){return ge instanceof C}class N extends r.ElementNode{static getType(){return"heading"}static clone(te){return new N(te.__tag,te.__key)}constructor(te,he){super(he),this.__tag=te}getTag(){return this.__tag}createDOM(te){const he=this.__tag,V=document.createElement(he),B=te.theme.heading;if(B!==void 0){const q=B[he];n.addClassNamesToElement(V,q)}return V}updateDOM(te,he){return!1}static importDOM(){return{h1:te=>({conversion:O,priority:0}),h2:te=>({conversion:O,priority:0}),h3:te=>({conversion:O,priority:0}),h4:te=>({conversion:O,priority:0}),h5:te=>({conversion:O,priority:0}),h6:te=>({conversion:O,priority:0}),p:te=>{const he=te.firstChild;return he!==null&&R(he)?{conversion:()=>({node:null}),priority:3}:null},span:te=>R(te)?{conversion:he=>({node:I("h1")}),priority:3}:null}}exportDOM(te){const{element:he}=super.exportDOM(te);if(he&&n.isHTMLElement(he)){this.isEmpty()&&he.append(document.createElement("br"));const V=this.getFormatType();he.style.textAlign=V;const B=this.getDirection();B&&(he.dir=B)}return{element:he}}static importJSON(te){const he=I(te.tag);return he.setFormat(te.format),he.setIndent(te.indent),he.setDirection(te.direction),he}exportJSON(){return{...super.exportJSON(),tag:this.getTag(),type:"heading",version:1}}insertNewAfter(te,he=!0){const V=te?te.anchor.offset:0,B=V===this.getTextContentSize()||!te?r.$createParagraphNode():I(this.getTag()),q=this.getDirection();if(B.setDirection(q),this.insertAfter(B,he),V===0&&!this.isEmpty()&&te){const ie=r.$createParagraphNode();ie.select(),this.replace(ie,!0)}return B}collapseAtStart(){const te=this.isEmpty()?r.$createParagraphNode():I(this.getTag());return this.getChildren().forEach(he=>te.append(he)),this.replace(te),!0}extractWithChild(){return!0}}function R(ge){return ge.nodeName.toLowerCase()==="span"?ge.style.fontSize==="26pt":!1}function O(ge){const te=ge.nodeName.toLowerCase();let he=null;return(te==="h1"||te==="h2"||te==="h3"||te==="h4"||te==="h5"||te==="h6")&&(he=I(te),ge.style!==null&&he.setFormat(ge.style.textAlign)),{node:he}}function k(ge){const te=b();return ge.style!==null&&te.setFormat(ge.style.textAlign),{node:te}}function I(ge){return r.$applyNodeReplacement(new N(ge))}function M(ge){return ge instanceof N}function Y(ge,te){ge.preventDefault(),te.update(()=>{const he=r.$getSelection(),V=ge instanceof InputEvent||ge instanceof KeyboardEvent?null:ge.clipboardData;V!=null&&r.$INTERNAL_isPointSelection(he)&&e.$insertDataTransferForRichText(V,he,te)},{tag:"paste"})}async function ee(ge,te){await e.copyToClipboard(te,n.objectKlassEquals(ge,ClipboardEvent)?ge:null),te.update(()=>{const he=r.$getSelection();r.$isRangeSelection(he)?he.removeText():r.$isNodeSelection(he)&&he.getNodes().forEach(V=>V.remove())})}function re(ge){let te=null;if(ge instanceof DragEvent?te=ge.dataTransfer:ge instanceof ClipboardEvent&&(te=ge.clipboardData),te===null)return[!1,[],!1];const he=te.types,V=he.includes("Files"),B=he.includes("text/html")||he.includes("text/plain");return[V,Array.from(te.files),B]}function Z(ge){const te=r.$getSelection();if(!r.$isRangeSelection(te))return!1;const he=new Set,V=te.getNodes();for(let B=0;B<V.length;B++){const q=V[B],ie=q.getKey();if(he.has(ie))continue;const H=n.$getNearestBlockElementAncestorOrThrow(q),j=H.getKey();H.canIndent()&&!he.has(j)&&(he.add(j),ge(H))}return he.size>0}function U(ge){const te=r.$getNearestNodeFromDOMNode(ge);return r.$isDecoratorNode(te)}function J(ge){const te=ge.focus;return te.key==="root"&&te.offset===r.$getRoot().getChildrenSize()}function fe(ge){return n.mergeRegister(ge.registerCommand(r.CLICK_COMMAND,te=>{const he=r.$getSelection();return r.$isNodeSelection(he)?(he.clear(),!0):!1},0),ge.registerCommand(r.DELETE_CHARACTER_COMMAND,te=>{const he=r.$getSelection();return r.$isRangeSelection(he)?(he.deleteCharacter(te),!0):!1},r.COMMAND_PRIORITY_EDITOR),ge.registerCommand(r.DELETE_WORD_COMMAND,te=>{const he=r.$getSelection();return r.$isRangeSelection(he)?(he.deleteWord(te),!0):!1},r.COMMAND_PRIORITY_EDITOR),ge.registerCommand(r.DELETE_LINE_COMMAND,te=>{const he=r.$getSelection();return r.$isRangeSelection(he)?(he.deleteLine(te),!0):!1},r.COMMAND_PRIORITY_EDITOR),ge.registerCommand(r.CONTROLLED_TEXT_INSERTION_COMMAND,te=>{const he=r.$getSelection();if(typeof te=="string")r.$INTERNAL_isPointSelection(he)&&he.insertText(te);else{if(!r.$INTERNAL_isPointSelection(he))return!1;const V=te.dataTransfer;if(V!=null)e.$insertDataTransferForRichText(V,he,ge);else if(r.$isRangeSelection(he)){const B=te.data;return B&&he.insertText(B),!0}}return!0},r.COMMAND_PRIORITY_EDITOR),ge.registerCommand(r.REMOVE_TEXT_COMMAND,()=>{const te=r.$getSelection();return r.$isRangeSelection(te)?(te.removeText(),!0):!1},r.COMMAND_PRIORITY_EDITOR),ge.registerCommand(r.FORMAT_TEXT_COMMAND,te=>{const he=r.$getSelection();return r.$isRangeSelection(he)?(he.formatText(te),!0):!1},r.COMMAND_PRIORITY_EDITOR),ge.registerCommand(r.FORMAT_ELEMENT_COMMAND,te=>{const he=r.$getSelection();if(!r.$isRangeSelection(he)&&!r.$isNodeSelection(he))return!1;const V=he.getNodes();for(const B of V){const q=n.$findMatchingParent(B,ie=>r.$isElementNode(ie)&&!ie.isInline());q!==null&&q.setFormat(te)}return!0},r.COMMAND_PRIORITY_EDITOR),ge.registerCommand(r.INSERT_LINE_BREAK_COMMAND,te=>{const he=r.$getSelection();return r.$isRangeSelection(he)?(he.insertLineBreak(te),!0):!1},r.COMMAND_PRIORITY_EDITOR),ge.registerCommand(r.INSERT_PARAGRAPH_COMMAND,()=>{const te=r.$getSelection();return r.$isRangeSelection(te)?(te.insertParagraph(),!0):!1},r.COMMAND_PRIORITY_EDITOR),ge.registerCommand(r.INSERT_TAB_COMMAND,()=>(r.$insertNodes([r.$createTabNode()]),!0),r.COMMAND_PRIORITY_EDITOR),ge.registerCommand(r.INDENT_CONTENT_COMMAND,()=>Z(te=>{const he=te.getIndent();te.setIndent(he+1)}),r.COMMAND_PRIORITY_EDITOR),ge.registerCommand(r.OUTDENT_CONTENT_COMMAND,()=>Z(te=>{const he=te.getIndent();he>0&&te.setIndent(he-1)}),r.COMMAND_PRIORITY_EDITOR),ge.registerCommand(r.KEY_ARROW_UP_COMMAND,te=>{const he=r.$getSelection();if(r.$isNodeSelection(he)&&!U(te.target)){const V=he.getNodes();if(V.length>0)return V[0].selectPrevious(),!0}else if(r.$isRangeSelection(he)){const V=r.$getAdjacentNode(he.focus,!0);if(!te.shiftKey&&r.$isDecoratorNode(V)&&!V.isIsolated()&&!V.isInline())return V.selectPrevious(),te.preventDefault(),!0}return!1},r.COMMAND_PRIORITY_EDITOR),ge.registerCommand(r.KEY_ARROW_DOWN_COMMAND,te=>{const he=r.$getSelection();if(r.$isNodeSelection(he)){const V=he.getNodes();if(V.length>0)return V[0].selectNext(0,0),!0}else if(r.$isRangeSelection(he)){if(J(he))return te.preventDefault(),!0;const V=r.$getAdjacentNode(he.focus,!1);if(!te.shiftKey&&r.$isDecoratorNode(V)&&!V.isIsolated()&&!V.isInline())return V.selectNext(),te.preventDefault(),!0}return!1},r.COMMAND_PRIORITY_EDITOR),ge.registerCommand(r.KEY_ARROW_LEFT_COMMAND,te=>{const he=r.$getSelection();if(r.$isNodeSelection(he)){const V=he.getNodes();if(V.length>0)return te.preventDefault(),V[0].selectPrevious(),!0}if(!r.$isRangeSelection(he))return!1;if(t.$shouldOverrideDefaultCharacterSelection(he,!0)){const V=te.shiftKey;return te.preventDefault(),t.$moveCharacter(he,V,!0),!0}return!1},r.COMMAND_PRIORITY_EDITOR),ge.registerCommand(r.KEY_ARROW_RIGHT_COMMAND,te=>{const he=r.$getSelection();if(r.$isNodeSelection(he)&&!U(te.target)){const B=he.getNodes();if(B.length>0)return te.preventDefault(),B[0].selectNext(0,0),!0}if(!r.$isRangeSelection(he))return!1;const V=te.shiftKey;return t.$shouldOverrideDefaultCharacterSelection(he,!1)?(te.preventDefault(),t.$moveCharacter(he,V,!1),!0):!1},r.COMMAND_PRIORITY_EDITOR),ge.registerCommand(r.KEY_BACKSPACE_COMMAND,te=>{if(U(te.target))return!1;const he=r.$getSelection();if(!r.$isRangeSelection(he))return!1;te.preventDefault();const{anchor:V}=he,B=V.getNode();return he.isCollapsed()&&V.offset===0&&!r.$isRootNode(B)&&n.$getNearestBlockElementAncestorOrThrow(B).getIndent()>0?ge.dispatchCommand(r.OUTDENT_CONTENT_COMMAND,void 0):ge.dispatchCommand(r.DELETE_CHARACTER_COMMAND,!0)},r.COMMAND_PRIORITY_EDITOR),ge.registerCommand(r.KEY_DELETE_COMMAND,te=>{if(U(te.target))return!1;const he=r.$getSelection();return r.$isRangeSelection(he)?(te.preventDefault(),ge.dispatchCommand(r.DELETE_CHARACTER_COMMAND,!1)):!1},r.COMMAND_PRIORITY_EDITOR),ge.registerCommand(r.KEY_ENTER_COMMAND,te=>{const he=r.$getSelection();if(!r.$isRangeSelection(he))return!1;if(te!==null){if((p||u||_)&&l)return!1;if(te.preventDefault(),te.shiftKey)return ge.dispatchCommand(r.INSERT_LINE_BREAK_COMMAND,!1)}return ge.dispatchCommand(r.INSERT_PARAGRAPH_COMMAND,void 0)},r.COMMAND_PRIORITY_EDITOR),ge.registerCommand(r.KEY_ESCAPE_COMMAND,()=>{const te=r.$getSelection();return r.$isRangeSelection(te)?(ge.blur(),!0):!1},r.COMMAND_PRIORITY_EDITOR),ge.registerCommand(r.DROP_COMMAND,te=>{const[,he]=re(te);if(he.length>0){const B=te.clientX,q=te.clientY,ie=o(B,q);if(ie!==null){const{offset:H,node:j}=ie,Q=r.$getNearestNodeFromDOMNode(j);if(Q!==null){const F=r.$createRangeSelection();if(r.$isTextNode(Q))F.anchor.set(Q.getKey(),H,"text"),F.focus.set(Q.getKey(),H,"text");else{const T=Q.getParentOrThrow().getKey(),P=Q.getIndexWithinParent()+1;F.anchor.set(T,P,"element"),F.focus.set(T,P,"element")}const w=r.$normalizeSelection__EXPERIMENTAL(F);r.$setSelection(w)}ge.dispatchCommand(v,he)}return te.preventDefault(),!0}const V=r.$getSelection();return!!r.$isRangeSelection(V)},r.COMMAND_PRIORITY_EDITOR),ge.registerCommand(r.DRAGSTART_COMMAND,te=>{const[he]=re(te),V=r.$getSelection();return!(he&&!r.$isRangeSelection(V))},r.COMMAND_PRIORITY_EDITOR),ge.registerCommand(r.DRAGOVER_COMMAND,te=>{const[he]=re(te),V=r.$getSelection();if(he&&!r.$isRangeSelection(V))return!1;const B=te.clientX,q=te.clientY,ie=o(B,q);if(ie!==null){const H=r.$getNearestNodeFromDOMNode(ie.node);r.$isDecoratorNode(H)&&te.preventDefault()}return!0},r.COMMAND_PRIORITY_EDITOR),ge.registerCommand(r.SELECT_ALL_COMMAND,()=>(r.$selectAll(),!0),r.COMMAND_PRIORITY_EDITOR),ge.registerCommand(r.COPY_COMMAND,te=>(e.copyToClipboard(ge,n.objectKlassEquals(te,ClipboardEvent)?te:null),!0),r.COMMAND_PRIORITY_EDITOR),ge.registerCommand(r.CUT_COMMAND,te=>(ee(te,ge),!0),r.COMMAND_PRIORITY_EDITOR),ge.registerCommand(r.PASTE_COMMAND,te=>{const[,he,V]=re(te);if(he.length>0&&!V)return ge.dispatchCommand(v,he),!0;if(r.isSelectionCapturedInDecoratorInput(te.target))return!1;const B=r.$getSelection();return r.$INTERNAL_isPointSelection(B)?(Y(te,ge),!0):!1},r.COMMAND_PRIORITY_EDITOR))}return ko.$createHeadingNode=I,ko.$createQuoteNode=b,ko.$isHeadingNode=M,ko.$isQuoteNode=y,ko.DRAG_DROP_PASTE=v,ko.HeadingNode=N,ko.QuoteNode=C,ko.eventFiles=re,ko.registerRichText=fe,ko}var Po={},Py;function UO(){if(Py)return Po;Py=1;var e=eE(),t=Ha(),n=vn(),r=Xt();function o(Z,U){return typeof document.caretRangeFromPoint<"u"?(Z=document.caretRangeFromPoint(Z,U),Z===null?null:{node:Z.startContainer,offset:Z.startOffset}):document.caretPositionFromPoint!=="undefined"?(Z=document.caretPositionFromPoint(Z,U),Z===null?null:{node:Z.offsetNode,offset:Z.offset}):null}let i=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",a=i&&"documentMode"in document?document.documentMode:null,l=i&&"InputEvent"in window&&!a?"getTargetRanges"in new window.InputEvent("input"):!1,u=i&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),p=i&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,m=i&&/^(?=.*Chrome).*/i.test(navigator.userAgent),_=i&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&!m,v=r.createCommand("DRAG_DROP_PASTE_FILE");class C extends r.ElementNode{static getType(){return"quote"}static clone(U){return new C(U.__key)}constructor(U){super(U)}createDOM(U){let J=document.createElement("blockquote");return n.addClassNamesToElement(J,U.theme.quote),J}updateDOM(){return!1}static importDOM(){return{blockquote:()=>({conversion:O,priority:0})}}exportDOM(U){if({element:U}=super.exportDOM(U),U&&n.isHTMLElement(U)){this.isEmpty()&&U.append(document.createElement("br"));var J=this.getFormatType();U.style.textAlign=J,(J=this.getDirection())&&(U.dir=J)}return{element:U}}static importJSON(U){let J=b();return J.setFormat(U.format),J.setIndent(U.indent),J.setDirection(U.direction),J}exportJSON(){return{...super.exportJSON(),type:"quote"}}insertNewAfter(U,J){U=r.$createParagraphNode();let fe=this.getDirection();return U.setDirection(fe),this.insertAfter(U,J),U}collapseAtStart(){let U=r.$createParagraphNode();return this.getChildren().forEach(J=>U.append(J)),this.replace(U),!0}}function b(){return r.$applyNodeReplacement(new C)}class y extends r.ElementNode{static getType(){return"heading"}static clone(U){return new y(U.__tag,U.__key)}constructor(U,J){super(J),this.__tag=U}getTag(){return this.__tag}createDOM(U){let J=this.__tag,fe=document.createElement(J);return U=U.theme.heading,U!==void 0&&n.addClassNamesToElement(fe,U[J]),fe}updateDOM(){return!1}static importDOM(){return{h1:()=>({conversion:R,priority:0}),h2:()=>({conversion:R,priority:0}),h3:()=>({conversion:R,priority:0}),h4:()=>({conversion:R,priority:0}),h5:()=>({conversion:R,priority:0}),h6:()=>({conversion:R,priority:0}),p:U=>(U=U.firstChild,U!==null&&N(U)?{conversion:()=>({node:null}),priority:3}:null),span:U=>N(U)?{conversion:()=>({node:k("h1")}),priority:3}:null}}exportDOM(U){if({element:U}=super.exportDOM(U),U&&n.isHTMLElement(U)){this.isEmpty()&&U.append(document.createElement("br"));var J=this.getFormatType();U.style.textAlign=J,(J=this.getDirection())&&(U.dir=J)}return{element:U}}static importJSON(U){let J=k(U.tag);return J.setFormat(U.format),J.setIndent(U.indent),J.setDirection(U.direction),J}exportJSON(){return{...super.exportJSON(),tag:this.getTag(),type:"heading",version:1}}insertNewAfter(U,J=!0){let fe=U?U.anchor.offset:0,ge=fe!==this.getTextContentSize()&&U?k(this.getTag()):r.$createParagraphNode(),te=this.getDirection();return ge.setDirection(te),this.insertAfter(ge,J),fe===0&&!this.isEmpty()&&U&&(U=r.$createParagraphNode(),U.select(),this.replace(U,!0)),ge}collapseAtStart(){let U=this.isEmpty()?r.$createParagraphNode():k(this.getTag());return this.getChildren().forEach(J=>U.append(J)),this.replace(U),!0}extractWithChild(){return!0}}function N(Z){return Z.nodeName.toLowerCase()==="span"?Z.style.fontSize==="26pt":!1}function R(Z){let U=Z.nodeName.toLowerCase(),J=null;return(U==="h1"||U==="h2"||U==="h3"||U==="h4"||U==="h5"||U==="h6")&&(J=k(U),Z.style!==null&&J.setFormat(Z.style.textAlign)),{node:J}}function O(Z){let U=b();return Z.style!==null&&U.setFormat(Z.style.textAlign),{node:U}}function k(Z){return r.$applyNodeReplacement(new y(Z))}function I(Z,U){Z.preventDefault(),U.update(()=>{let J=r.$getSelection(),fe=Z instanceof InputEvent||Z instanceof KeyboardEvent?null:Z.clipboardData;fe!=null&&r.$INTERNAL_isPointSelection(J)&&e.$insertDataTransferForRichText(fe,J,U)},{tag:"paste"})}async function M(Z,U){await e.copyToClipboard(U,n.objectKlassEquals(Z,ClipboardEvent)?Z:null),U.update(()=>{let J=r.$getSelection();r.$isRangeSelection(J)?J.removeText():r.$isNodeSelection(J)&&J.getNodes().forEach(fe=>fe.remove())})}function Y(Z){let U=null;if(Z instanceof DragEvent?U=Z.dataTransfer:Z instanceof ClipboardEvent&&(U=Z.clipboardData),U===null)return[!1,[],!1];var J=U.types;return Z=J.includes("Files"),J=J.includes("text/html")||J.includes("text/plain"),[Z,Array.from(U.files),J]}function ee(Z){var U=r.$getSelection();if(!r.$isRangeSelection(U))return!1;let J=new Set;U=U.getNodes();for(let te=0;te<U.length;te++){var fe=U[te],ge=fe.getKey();J.has(ge)||(fe=n.$getNearestBlockElementAncestorOrThrow(fe),ge=fe.getKey(),fe.canIndent()&&!J.has(ge)&&(J.add(ge),Z(fe)))}return 0<J.size}function re(Z){return Z=r.$getNearestNodeFromDOMNode(Z),r.$isDecoratorNode(Z)}return Po.$createHeadingNode=k,Po.$createQuoteNode=b,Po.$isHeadingNode=function(Z){return Z instanceof y},Po.$isQuoteNode=function(Z){return Z instanceof C},Po.DRAG_DROP_PASTE=v,Po.HeadingNode=y,Po.QuoteNode=C,Po.eventFiles=Y,Po.registerRichText=function(Z){return n.mergeRegister(Z.registerCommand(r.CLICK_COMMAND,()=>{const U=r.$getSelection();return r.$isNodeSelection(U)?(U.clear(),!0):!1},0),Z.registerCommand(r.DELETE_CHARACTER_COMMAND,U=>{const J=r.$getSelection();return r.$isRangeSelection(J)?(J.deleteCharacter(U),!0):!1},r.COMMAND_PRIORITY_EDITOR),Z.registerCommand(r.DELETE_WORD_COMMAND,U=>{const J=r.$getSelection();return r.$isRangeSelection(J)?(J.deleteWord(U),!0):!1},r.COMMAND_PRIORITY_EDITOR),Z.registerCommand(r.DELETE_LINE_COMMAND,U=>{const J=r.$getSelection();return r.$isRangeSelection(J)?(J.deleteLine(U),!0):!1},r.COMMAND_PRIORITY_EDITOR),Z.registerCommand(r.CONTROLLED_TEXT_INSERTION_COMMAND,U=>{const J=r.$getSelection();if(typeof U=="string")r.$INTERNAL_isPointSelection(J)&&J.insertText(U);else{if(!r.$INTERNAL_isPointSelection(J))return!1;const fe=U.dataTransfer;fe!=null?e.$insertDataTransferForRichText(fe,J,Z):r.$isRangeSelection(J)&&(U=U.data)&&J.insertText(U)}return!0},r.COMMAND_PRIORITY_EDITOR),Z.registerCommand(r.REMOVE_TEXT_COMMAND,()=>{const U=r.$getSelection();return r.$isRangeSelection(U)?(U.removeText(),!0):!1},r.COMMAND_PRIORITY_EDITOR),Z.registerCommand(r.FORMAT_TEXT_COMMAND,U=>{const J=r.$getSelection();return r.$isRangeSelection(J)?(J.formatText(U),!0):!1},r.COMMAND_PRIORITY_EDITOR),Z.registerCommand(r.FORMAT_ELEMENT_COMMAND,U=>{var J=r.$getSelection();if(!r.$isRangeSelection(J)&&!r.$isNodeSelection(J))return!1;J=J.getNodes();for(const fe of J)J=n.$findMatchingParent(fe,ge=>r.$isElementNode(ge)&&!ge.isInline()),J!==null&&J.setFormat(U);return!0},r.COMMAND_PRIORITY_EDITOR),Z.registerCommand(r.INSERT_LINE_BREAK_COMMAND,U=>{const J=r.$getSelection();return r.$isRangeSelection(J)?(J.insertLineBreak(U),!0):!1},r.COMMAND_PRIORITY_EDITOR),Z.registerCommand(r.INSERT_PARAGRAPH_COMMAND,()=>{const U=r.$getSelection();return r.$isRangeSelection(U)?(U.insertParagraph(),!0):!1},r.COMMAND_PRIORITY_EDITOR),Z.registerCommand(r.INSERT_TAB_COMMAND,()=>(r.$insertNodes([r.$createTabNode()]),!0),r.COMMAND_PRIORITY_EDITOR),Z.registerCommand(r.INDENT_CONTENT_COMMAND,()=>ee(U=>{const J=U.getIndent();U.setIndent(J+1)}),r.COMMAND_PRIORITY_EDITOR),Z.registerCommand(r.OUTDENT_CONTENT_COMMAND,()=>ee(U=>{const J=U.getIndent();0<J&&U.setIndent(J-1)}),r.COMMAND_PRIORITY_EDITOR),Z.registerCommand(r.KEY_ARROW_UP_COMMAND,U=>{var J=r.$getSelection();if(r.$isNodeSelection(J)&&!re(U.target)){if(U=J.getNodes(),0<U.length)return U[0].selectPrevious(),!0}else if(r.$isRangeSelection(J)&&(J=r.$getAdjacentNode(J.focus,!0),!U.shiftKey&&r.$isDecoratorNode(J)&&!J.isIsolated()&&!J.isInline()))return J.selectPrevious(),U.preventDefault(),!0;return!1},r.COMMAND_PRIORITY_EDITOR),Z.registerCommand(r.KEY_ARROW_DOWN_COMMAND,U=>{var J=r.$getSelection();if(r.$isNodeSelection(J)){if(U=J.getNodes(),0<U.length)return U[0].selectNext(0,0),!0}else if(r.$isRangeSelection(J)){let fe=J.focus;if(fe.key==="root"&&fe.offset===r.$getRoot().getChildrenSize())return U.preventDefault(),!0;if(J=r.$getAdjacentNode(J.focus,!1),!U.shiftKey&&r.$isDecoratorNode(J)&&!J.isIsolated()&&!J.isInline())return J.selectNext(),U.preventDefault(),!0}return!1},r.COMMAND_PRIORITY_EDITOR),Z.registerCommand(r.KEY_ARROW_LEFT_COMMAND,U=>{const J=r.$getSelection();if(r.$isNodeSelection(J)){var fe=J.getNodes();if(0<fe.length)return U.preventDefault(),fe[0].selectPrevious(),!0}return r.$isRangeSelection(J)&&t.$shouldOverrideDefaultCharacterSelection(J,!0)?(fe=U.shiftKey,U.preventDefault(),t.$moveCharacter(J,fe,!0),!0):!1},r.COMMAND_PRIORITY_EDITOR),Z.registerCommand(r.KEY_ARROW_RIGHT_COMMAND,U=>{const J=r.$getSelection();if(r.$isNodeSelection(J)&&!re(U.target)){var fe=J.getNodes();if(0<fe.length)return U.preventDefault(),fe[0].selectNext(0,0),!0}return r.$isRangeSelection(J)?(fe=U.shiftKey,t.$shouldOverrideDefaultCharacterSelection(J,!1)?(U.preventDefault(),t.$moveCharacter(J,fe,!1),!0):!1):!1},r.COMMAND_PRIORITY_EDITOR),Z.registerCommand(r.KEY_BACKSPACE_COMMAND,U=>{if(re(U.target))return!1;const J=r.$getSelection();if(!r.$isRangeSelection(J))return!1;U.preventDefault(),{anchor:U}=J;const fe=U.getNode();return J.isCollapsed()&&U.offset===0&&!r.$isRootNode(fe)&&0<n.$getNearestBlockElementAncestorOrThrow(fe).getIndent()?Z.dispatchCommand(r.OUTDENT_CONTENT_COMMAND,void 0):Z.dispatchCommand(r.DELETE_CHARACTER_COMMAND,!0)},r.COMMAND_PRIORITY_EDITOR),Z.registerCommand(r.KEY_DELETE_COMMAND,U=>{if(re(U.target))return!1;const J=r.$getSelection();return r.$isRangeSelection(J)?(U.preventDefault(),Z.dispatchCommand(r.DELETE_CHARACTER_COMMAND,!1)):!1},r.COMMAND_PRIORITY_EDITOR),Z.registerCommand(r.KEY_ENTER_COMMAND,U=>{const J=r.$getSelection();if(!r.$isRangeSelection(J))return!1;if(U!==null){if((p||u||_)&&l)return!1;if(U.preventDefault(),U.shiftKey)return Z.dispatchCommand(r.INSERT_LINE_BREAK_COMMAND,!1)}return Z.dispatchCommand(r.INSERT_PARAGRAPH_COMMAND,void 0)},r.COMMAND_PRIORITY_EDITOR),Z.registerCommand(r.KEY_ESCAPE_COMMAND,()=>{const U=r.$getSelection();return r.$isRangeSelection(U)?(Z.blur(),!0):!1},r.COMMAND_PRIORITY_EDITOR),Z.registerCommand(r.DROP_COMMAND,U=>{const[,J]=Y(U);if(0<J.length){var fe=o(U.clientX,U.clientY);if(fe!==null){const{offset:te,node:he}=fe;var ge=r.$getNearestNodeFromDOMNode(he);if(ge!==null){if(fe=r.$createRangeSelection(),r.$isTextNode(ge))fe.anchor.set(ge.getKey(),te,"text"),fe.focus.set(ge.getKey(),te,"text");else{const V=ge.getParentOrThrow().getKey();ge=ge.getIndexWithinParent()+1,fe.anchor.set(V,ge,"element"),fe.focus.set(V,ge,"element")}fe=r.$normalizeSelection__EXPERIMENTAL(fe),r.$setSelection(fe)}Z.dispatchCommand(v,J)}return U.preventDefault(),!0}return U=r.$getSelection(),!!r.$isRangeSelection(U)},r.COMMAND_PRIORITY_EDITOR),Z.registerCommand(r.DRAGSTART_COMMAND,U=>{[U]=Y(U);const J=r.$getSelection();return!(U&&!r.$isRangeSelection(J))},r.COMMAND_PRIORITY_EDITOR),Z.registerCommand(r.DRAGOVER_COMMAND,U=>{var[J]=Y(U);const fe=r.$getSelection();return J&&!r.$isRangeSelection(fe)?!1:(J=o(U.clientX,U.clientY),J!==null&&(J=r.$getNearestNodeFromDOMNode(J.node),r.$isDecoratorNode(J)&&U.preventDefault()),!0)},r.COMMAND_PRIORITY_EDITOR),Z.registerCommand(r.SELECT_ALL_COMMAND,()=>(r.$selectAll(),!0),r.COMMAND_PRIORITY_EDITOR),Z.registerCommand(r.COPY_COMMAND,U=>(e.copyToClipboard(Z,n.objectKlassEquals(U,ClipboardEvent)?U:null),!0),r.COMMAND_PRIORITY_EDITOR),Z.registerCommand(r.CUT_COMMAND,U=>(M(U,Z),!0),r.COMMAND_PRIORITY_EDITOR),Z.registerCommand(r.PASTE_COMMAND,U=>{const[,J,fe]=Y(U);if(0<J.length&&!fe)return Z.dispatchCommand(v,J),!0;if(r.isSelectionCapturedInDecoratorInput(U.target))return!1;const ge=r.$getSelection();return r.$INTERNAL_isPointSelection(ge)?(I(U,Z),!0):!1},r.COMMAND_PRIORITY_EDITOR))},Po}var Iy,Ly;function $g(){return Ly||(Ly=1,Iy=process.env.NODE_ENV==="development"?GO():UO()),Iy}var Fy;function VO(){if(Fy)return Dh;Fy=1;var e=ur(),t=Zx(),n=z,r=Jx(),o=vn(),i=Ru,a=Xx(),l=$g(),u=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?n.useLayoutEffect:n.useEffect;function p(y){return y.getEditorState().read(r.$canShowPlaceholderCurry(y.isComposing()))}function m(y){const[N,R]=n.useState(()=>p(y));return u(()=>{function O(){const k=p(y);R(k)}return O(),o.mergeRegister(y.registerUpdateListener(()=>{O()}),y.registerEditableListener(()=>{O()}))},[y]),N}function _(y,N){const[R,O]=n.useState(()=>y.getDecorators());return u(()=>y.registerDecoratorListener(k=>{i.flushSync(()=>{O(k)})}),[y]),n.useEffect(()=>{O(y.getDecorators())},[y]),n.useMemo(()=>{const k=[],I=Object.keys(R);for(let M=0;M<I.length;M++){const Y=I[M],ee=n.createElement(N,{onError:Z=>y._onError(Z)},n.createElement(n.Suspense,{fallback:null},R[Y])),re=y.getElementByKey(Y);re!==null&&k.push(i.createPortal(ee,re,Y))}return k},[N,R,y])}function v(y){u(()=>o.mergeRegister(l.registerRichText(y),a.registerDragonSupport(y)),[y])}function C({contentEditable:y,placeholder:N,ErrorBoundary:R}){const[O]=e.useLexicalComposerContext(),k=_(O,R);return v(O),n.createElement(n.Fragment,null,y,n.createElement(b,{content:N}),k)}function b({content:y}){const[N]=e.useLexicalComposerContext(),R=m(N),O=t();return R?typeof y=="function"?y(O):y:null}return Dh.RichTextPlugin=C,Dh}var Lh={},jy;function YO(){if(jy)return Lh;jy=1;var e=ur(),t=Zx(),n=z,r=Jx(),o=vn(),i=Ru,a=Xx(),l=$g(),u=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?n.useLayoutEffect:n.useEffect;function p(b){return b.getEditorState().read(r.$canShowPlaceholderCurry(b.isComposing()))}function m(b){let[y,N]=n.useState(()=>p(b));return u(()=>{function R(){let O=p(b);N(O)}return R(),o.mergeRegister(b.registerUpdateListener(()=>{R()}),b.registerEditableListener(()=>{R()}))},[b]),y}function _(b,y){let[N,R]=n.useState(()=>b.getDecorators());return u(()=>b.registerDecoratorListener(O=>{i.flushSync(()=>{R(O)})}),[b]),n.useEffect(()=>{R(b.getDecorators())},[b]),n.useMemo(()=>{let O=[],k=Object.keys(N);for(let I=0;I<k.length;I++){let M=k[I],Y=n.createElement(y,{onError:re=>b._onError(re)},n.createElement(n.Suspense,{fallback:null},N[M])),ee=b.getElementByKey(M);ee!==null&&O.push(i.createPortal(Y,ee,M))}return O},[y,N,b])}function v(b){u(()=>o.mergeRegister(l.registerRichText(b),a.registerDragonSupport(b)),[b])}function C({content:b}){var[y]=e.useLexicalComposerContext();y=m(y);let N=t();return y?typeof b=="function"?b(N):b:null}return Lh.RichTextPlugin=function({contentEditable:b,placeholder:y,ErrorBoundary:N}){let[R]=e.useLexicalComposerContext();return N=_(R,N),v(R),n.createElement(n.Fragment,null,b,n.createElement(C,{content:y}),N)},Lh}process.env.NODE_ENV==="development"?VO():YO();var Fh={},By;function qO(){if(By)return Fh;By=1;var e=ur(),t=z;function n(){return n=Object.assign?Object.assign.bind():function(i){for(var a=1;a<arguments.length;a++){var l=arguments[a];for(var u in l)Object.prototype.hasOwnProperty.call(l,u)&&(i[u]=l[u])}return i},n.apply(this,arguments)}var r=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?t.useLayoutEffect:t.useEffect;function o({ariaActiveDescendant:i,ariaAutoComplete:a,ariaControls:l,ariaDescribedBy:u,ariaExpanded:p,ariaLabel:m,ariaLabelledBy:_,ariaMultiline:v,ariaOwns:C,ariaRequired:b,autoCapitalize:y,className:N,id:R,role:O="textbox",spellCheck:k=!0,style:I,tabIndex:M,"data-testid":Y,...ee}){const[re]=e.useLexicalComposerContext(),[Z,U]=t.useState(!1),J=t.useCallback(fe=>{re.setRootElement(fe)},[re]);return r(()=>(U(re.isEditable()),re.registerEditableListener(fe=>{U(fe)})),[re]),t.createElement("div",n({},ee,{"aria-activedescendant":Z?i:void 0,"aria-autocomplete":Z?a:"none","aria-controls":Z?l:void 0,"aria-describedby":u,"aria-expanded":Z&&O==="combobox"?!!p:void 0,"aria-label":m,"aria-labelledby":_,"aria-multiline":v,"aria-owns":Z?C:void 0,"aria-readonly":Z?void 0:!0,"aria-required":b,autoCapitalize:y,className:N,contentEditable:Z,"data-testid":Y,id:R,ref:J,role:O,spellCheck:k,style:I,tabIndex:M}))}return Fh.ContentEditable=o,Fh}var jh={},Hy;function ZO(){if(Hy)return jh;Hy=1;var e=ur(),t=z;function n(){return n=Object.assign?Object.assign.bind():function(o){for(var i=1;i<arguments.length;i++){var a=arguments[i],l;for(l in a)Object.prototype.hasOwnProperty.call(a,l)&&(o[l]=a[l])}return o},n.apply(this,arguments)}var r=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?t.useLayoutEffect:t.useEffect;return jh.ContentEditable=function({ariaActiveDescendant:o,ariaAutoComplete:i,ariaControls:a,ariaDescribedBy:l,ariaExpanded:u,ariaLabel:p,ariaLabelledBy:m,ariaMultiline:_,ariaOwns:v,ariaRequired:C,autoCapitalize:b,className:y,id:N,role:R="textbox",spellCheck:O=!0,style:k,tabIndex:I,"data-testid":M,...Y}){let[ee]=e.useLexicalComposerContext(),[re,Z]=t.useState(!1),U=t.useCallback(J=>{ee.setRootElement(J)},[ee]);return r(()=>(Z(ee.isEditable()),ee.registerEditableListener(J=>{Z(J)})),[ee]),t.createElement("div",n({},Y,{"aria-activedescendant":re?o:void 0,"aria-autocomplete":re?i:"none","aria-controls":re?a:void 0,"aria-describedby":l,"aria-expanded":re&&R==="combobox"?!!u:void 0,"aria-label":p,"aria-labelledby":m,"aria-multiline":_,"aria-owns":re?v:void 0,"aria-readonly":re?void 0:!0,"aria-required":C,autoCapitalize:b,className:y,contentEditable:re,"data-testid":M,id:N,ref:U,role:R,spellCheck:O,style:k,tabIndex:I}))},jh}process.env.NODE_ENV==="development"?qO():ZO();var Bh,Wy;function JO(){if(Wy)return Bh;Wy=1;var e=z;function t(l,u){return t=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,m){return p.__proto__=m,p},t(l,u)}function n(l,u){l.prototype=Object.create(u.prototype),l.prototype.constructor=l,t(l,u)}var r=function(l,u){return l===void 0&&(l=[]),u===void 0&&(u=[]),l.length!==u.length||l.some(function(p,m){return!Object.is(p,u[m])})},o={error:null},i=function(l){n(u,l);function u(){for(var m,_=arguments.length,v=new Array(_),C=0;C<_;C++)v[C]=arguments[C];return m=l.call.apply(l,[this].concat(v))||this,m.state=o,m.resetErrorBoundary=function(){for(var b,y=arguments.length,N=new Array(y),R=0;R<y;R++)N[R]=arguments[R];m.props.onReset==null||(b=m.props).onReset.apply(b,N),m.reset()},m}u.getDerivedStateFromError=function(m){return{error:m}};var p=u.prototype;return p.reset=function(){this.setState(o)},p.componentDidCatch=function(m,_){var v,C;(v=(C=this.props).onError)==null||v.call(C,m,_)},p.componentDidUpdate=function(m,_){var v=this.state.error,C=this.props.resetKeys;if(v!==null&&_.error!==null&&r(m.resetKeys,C)){var b,y;(b=(y=this.props).onResetKeysChange)==null||b.call(y,m.resetKeys,C),this.reset()}},p.render=function(){var m=this.state.error,_=this.props,v=_.fallbackRender,C=_.FallbackComponent,b=_.fallback;if(m!==null){var y={error:m,resetErrorBoundary:this.resetErrorBoundary};if(e.isValidElement(b))return b;if(typeof v=="function")return v(y);if(C)return e.createElement(C,y);throw new Error("react-error-boundary requires either a fallback, fallbackRender, or FallbackComponent prop")}return this.props.children},u}(e.Component);function a({children:l,onError:u}){return e.createElement(i,{fallback:e.createElement("div",{style:{border:"1px solid #f00",color:"#f00",padding:"8px"}},"An error was thrown."),onError:u},l)}return Bh=a,Bh}var Hh,zy;function XO(){if(zy)return Hh;zy=1;var e=z;function t(a,l){return t=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(u,p){return u.__proto__=p,u},t(a,l)}function n(a,l){a.prototype=Object.create(l.prototype),a.prototype.constructor=a,t(a,l)}function r(a,l){return a===void 0&&(a=[]),l===void 0&&(l=[]),a.length!==l.length||a.some(function(u,p){return!Object.is(u,l[p])})}var o={error:null},i=function(a){function l(){for(var p,m=arguments.length,_=Array(m),v=0;v<m;v++)_[v]=arguments[v];return p=a.call.apply(a,[this].concat(_))||this,p.state=o,p.resetErrorBoundary=function(){for(var C,b=arguments.length,y=Array(b),N=0;N<b;N++)y[N]=arguments[N];p.props.onReset==null||(C=p.props).onReset.apply(C,y),p.reset()},p}n(l,a),l.getDerivedStateFromError=function(p){return{error:p}};var u=l.prototype;return u.reset=function(){this.setState(o)},u.componentDidCatch=function(p,m){var _,v;(_=(v=this.props).onError)==null||_.call(v,p,m)},u.componentDidUpdate=function(p,m){var _=this.props.resetKeys;if(this.state.error!==null&&m.error!==null&&r(p.resetKeys,_)){var v,C;(v=(C=this.props).onResetKeysChange)==null||v.call(C,p.resetKeys,_),this.reset()}},u.render=function(){var p=this.state.error,m=this.props,_=m.fallbackRender,v=m.FallbackComponent;if(m=m.fallback,p!==null){if(p={error:p,resetErrorBoundary:this.resetErrorBoundary},e.isValidElement(m))return m;if(typeof _=="function")return _(p);if(v)return e.createElement(v,p);throw Error("react-error-boundary requires either a fallback, fallbackRender, or FallbackComponent prop")}return this.props.children},l}(e.Component);return Hh=function({children:a,onError:l}){return e.createElement(i,{fallback:e.createElement("div",{style:{border:"1px solid #f00",color:"#f00",padding:"8px"}},"An error was thrown."),onError:l},a)},Hh}process.env.NODE_ENV==="development"?JO():XO();var Wh={},Ar={},Ky;function QO(){if(Ky)return Ar;Ky=1;var e=Xt(),t=vn();function n(H){let j=1,Q=H.getParent();for(;Q!=null;){if(re(Q)){const F=Q.getParent();if(he(F)){j++,Q=F.getParent();continue}throw Error("A ListItemNode must have a ListNode for a parent.")}return j}return j}function r(H){let j=H.getParent();if(!he(j))throw Error("A ListItemNode must have a ListNode for a parent.");let Q=j;for(;Q!==null;)Q=Q.getParent(),he(Q)&&(j=Q);return j}function o(H){let j=[];const Q=H.getChildren().filter(re);for(let F=0;F<Q.length;F++){const w=Q[F],T=w.getFirstChild();he(T)?j=j.concat(o(T)):j.push(w)}return j}function i(H){return re(H)&&he(H.getFirstChild())}function a(H){let j=H;for(;j.getNextSibling()==null&&j.getPreviousSibling()==null;){const Q=j.getParent();if(Q==null||!(re(j)||he(j)))break;j=Q}j.remove()}function l(H){return ee().append(H)}function u(H,j){return re(H)&&(j.length===0||j.length===1&&H.is(j[0])&&H.getChildrenSize()===0)}function p(H){const j=H.getParent();let Q=1;if(j!=null)if(he(j))Q=j.getStart();else throw Error("$getListItemValue: list node is not parent of list item node");const F=H.getPreviousSiblings();for(let w=0;w<F.length;w++){const T=F[w];re(T)&&!he(T.getFirstChild())&&Q++}return Q}function m(H,j){H.update(()=>{const Q=e.$getSelection();if(e.$INTERNAL_isPointSelection(Q)){const F=Q.getNodes(),w=Q.anchor.getNode(),T=w.getParent();if(u(w,F)){const P=te(j);if(e.$isRootOrShadowRoot(T)){w.replace(P);const X=ee();e.$isElementNode(w)&&(X.setFormat(w.getFormatType()),X.setIndent(w.getIndent())),P.append(X)}else if(re(w)){const X=w.getParentOrThrow();_(P,X.getChildren()),X.replace(P)}return}else{const P=new Set;for(let X=0;X<F.length;X++){const ue=F[X];if(e.$isElementNode(ue)&&ue.isEmpty()&&!re(ue)&&!P.has(ue.getKey())){v(ue,j);continue}if(e.$isLeafNode(ue)){let pe=ue.getParent();for(;pe!=null;){const se=pe.getKey();if(he(pe)){if(!P.has(se)){const Ce=te(j);_(Ce,pe.getChildren()),pe.replace(Ce),y(Ce),P.add(se)}break}else{const Ce=pe.getParent();if(e.$isRootOrShadowRoot(Ce)&&!P.has(se)){P.add(se),v(pe,j);break}pe=Ce}}}}}}})}function _(H,j){H.splice(H.getChildrenSize(),0,j)}function v(H,j){if(he(H))return H;const Q=H.getPreviousSibling(),F=H.getNextSibling(),w=ee();if(w.setFormat(H.getFormatType()),w.setIndent(H.getIndent()),_(w,H.getChildren()),he(Q)&&j===Q.getListType())return Q.append(w),H.remove(),he(F)&&j===F.getListType()&&(_(Q,F.getChildren()),F.remove()),Q;if(he(F)&&j===F.getListType())return F.getFirstChildOrThrow().insertBefore(w),H.remove(),F;{const T=te(j);return T.append(w),H.replace(T),y(T),T}}function C(H,j){const Q=H.getLastChild(),F=j.getFirstChild();Q&&F&&i(Q)&&i(F)&&(C(Q.getFirstChild(),F.getFirstChild()),F.remove());const w=j.getChildren();w.length>0&&(H.append(...w),y(H)),j.remove()}function b(H){H.update(()=>{const j=e.$getSelection();if(e.$isRangeSelection(j)){const Q=new Set,F=j.getNodes(),w=j.anchor.getNode();if(u(w,F))Q.add(r(w));else for(let T=0;T<F.length;T++){const P=F[T];if(e.$isLeafNode(P)){const X=t.$getNearestNodeOfType(P,k);X!=null&&Q.add(r(X))}}for(const T of Q){let P=T;const X=o(T);for(const ue of X){const pe=e.$createParagraphNode();_(pe,ue.getChildren()),P.insertAfter(pe),P=pe,ue.__key===j.anchor.key&&j.anchor.set(pe.getKey(),0,"element"),ue.__key===j.focus.key&&j.focus.set(pe.getKey(),0,"element"),ue.remove()}T.remove()}}})}function y(H,j){const Q=j||H.getChildren();if(Q!==void 0)for(let F=0;F<Q.length;F++){const w=Q[F];if(re(w)){const T=w.getValue(),P=p(w);T!==P&&w.setValue(P)}}}function N(H){const j=new Set;if(i(H)||j.has(H.getKey()))return;const Q=H.getParent(),F=H.getNextSibling(),w=H.getPreviousSibling();if(i(F)&&i(w)){const T=w.getFirstChild();if(he(T)){T.append(H);const P=F.getFirstChild();if(he(P)){const X=P.getChildren();_(T,X),F.remove(),j.add(F.getKey())}y(T)}}else if(i(F)){const T=F.getFirstChild();if(he(T)){const P=T.getFirstChild();P!==null&&P.insertBefore(H),y(T)}}else if(i(w)){const T=w.getFirstChild();he(T)&&(T.append(H),y(T))}else if(he(Q)){const T=ee(),P=te(Q.getListType());T.append(P),P.append(H),w?w.insertAfter(T):F?F.insertBefore(T):Q.append(T),y(P)}he(Q)&&y(Q)}function R(H){if(i(H))return;const j=H.getParent(),Q=j?j.getParent():void 0,F=Q?Q.getParent():void 0;if(he(F)&&re(Q)&&he(j)){const w=j?j.getFirstChild():void 0,T=j?j.getLastChild():void 0;if(H.is(w))Q.insertBefore(H),j.isEmpty()&&Q.remove();else if(H.is(T))Q.insertAfter(H),j.isEmpty()&&Q.remove();else{const P=j.getListType(),X=ee(),ue=te(P);X.append(ue),H.getPreviousSiblings().forEach(Ce=>ue.append(Ce));const pe=ee(),se=te(P);pe.append(se),_(se,H.getNextSiblings()),Q.insertBefore(X),Q.insertAfter(pe),Q.replace(H)}y(j),y(F)}}function O(){const H=e.$getSelection();if(!e.$isRangeSelection(H)||!H.isCollapsed())return!1;const j=H.anchor.getNode();if(!re(j)||j.getChildrenSize()!==0)return!1;const Q=r(j),F=j.getParent();if(!he(F))throw Error("A ListItemNode must have a ListNode for a parent.");const w=F.getParent();let T;if(e.$isRootOrShadowRoot(w))T=e.$createParagraphNode(),Q.insertAfter(T);else if(re(w))T=ee(),w.insertAfter(T);else return!1;T.select();const P=j.getNextSiblings();if(P.length>0){const X=te(F.getListType());if(e.$isParagraphNode(T))T.insertAfter(X);else{const ue=ee();ue.append(X),T.insertAfter(ue)}P.forEach(ue=>{ue.remove(),X.append(ue)})}return a(j),!0}class k extends e.ElementNode{static getType(){return"listitem"}static clone(j){return new k(j.__value,j.__checked,j.__key)}constructor(j,Q,F){super(F),this.__value=j===void 0?1:j,this.__checked=Q}createDOM(j){const Q=document.createElement("li"),F=this.getParent();return he(F)&&F.getListType()==="check"&&M(Q,this,null),Q.value=this.__value,I(Q,j.theme,this),Q}updateDOM(j,Q,F){const w=this.getParent();return he(w)&&w.getListType()==="check"&&M(Q,this,j),Q.value=this.__value,I(Q,F.theme,this),!1}static transform(){return j=>{const Q=j.getParent();he(Q)&&(y(Q),Q.getListType()!=="check"&&j.getChecked()!=null&&j.setChecked(void 0))}}static importDOM(){return{li:j=>({conversion:Y,priority:0})}}static importJSON(j){const Q=ee();return Q.setChecked(j.checked),Q.setValue(j.value),Q.setFormat(j.format),Q.setDirection(j.direction),Q}exportDOM(j){const Q=this.createDOM(j._config);return Q.style.textAlign=this.getFormatType(),{element:Q}}exportJSON(){return{...super.exportJSON(),checked:this.getChecked(),type:"listitem",value:this.getValue(),version:1}}append(...j){for(let Q=0;Q<j.length;Q++){const F=j[Q];if(e.$isElementNode(F)&&this.canMergeWith(F)){const w=F.getChildren();this.append(...w),F.remove()}else super.append(F)}return this}replace(j,Q){if(re(j))return super.replace(j);this.setIndent(0);const F=this.getParentOrThrow();if(!he(F))return j;if(F.__first===this.getKey())F.insertBefore(j);else if(F.__last===this.getKey())F.insertAfter(j);else{const w=te(F.getListType());let T=this.getNextSibling();for(;T;){const P=T;T=T.getNextSibling(),w.append(P)}F.insertAfter(j),j.insertAfter(w)}return Q&&this.getChildren().forEach(w=>{j.append(w)}),this.remove(),F.getChildrenSize()===0&&F.remove(),j}insertAfter(j,Q=!0){const F=this.getParentOrThrow();if(!he(F))throw Error("insertAfter: list node is not parent of list item node");const w=this.getNextSiblings();if(re(j)){const T=super.insertAfter(j,Q),P=j.getParentOrThrow();return he(P)&&y(P),T}if(he(j)){let T=j;const P=j.getChildren();for(let X=P.length-1;X>=0;X--)T=P[X],this.insertAfter(T,Q);return T}if(F.insertAfter(j,Q),w.length!==0){const T=te(F.getListType());w.forEach(P=>T.append(P)),j.insertAfter(T,Q)}return j}remove(j){const Q=this.getPreviousSibling(),F=this.getNextSibling();if(super.remove(j),Q&&F&&i(Q)&&i(F))C(Q.getFirstChild(),F.getFirstChild()),F.remove();else if(F){const w=F.getParent();he(w)&&y(w)}}insertNewAfter(j,Q=!0){const F=ee(this.__checked==null?void 0:!1);return this.insertAfter(F,Q),F}collapseAtStart(j){const Q=e.$createParagraphNode();this.getChildren().forEach(P=>Q.append(P));const F=this.getParentOrThrow(),w=F.getParentOrThrow(),T=re(w);if(F.getChildrenSize()===1)if(T)F.remove(),w.select();else{F.insertBefore(Q),F.remove();const P=j.anchor,X=j.focus,ue=Q.getKey();P.type==="element"&&P.getNode().is(this)&&P.set(ue,P.offset,"element"),X.type==="element"&&X.getNode().is(this)&&X.set(ue,X.offset,"element")}else F.insertBefore(Q),this.remove();return!0}getValue(){return this.getLatest().__value}setValue(j){const Q=this.getWritable();Q.__value=j}getChecked(){return this.getLatest().__checked}setChecked(j){const Q=this.getWritable();Q.__checked=j}toggleChecked(){this.setChecked(!this.__checked)}getIndent(){const j=this.getParent();if(j===null)return this.getLatest().__indent;let Q=j.getParentOrThrow(),F=0;for(;re(Q);)Q=Q.getParentOrThrow().getParentOrThrow(),F++;return F}setIndent(j){if(!(typeof j=="number"&&j>-1))throw Error("Invalid indent value.");let Q=this.getIndent();for(;Q!==j;)Q<j?(N(this),Q++):(R(this),Q--);return this}insertBefore(j){if(re(j)){const Q=this.getParentOrThrow();if(he(Q)){const F=this.getNextSiblings();y(Q,F)}}return super.insertBefore(j)}canInsertAfter(j){return re(j)}canReplaceWith(j){return re(j)}canMergeWith(j){return e.$isParagraphNode(j)||re(j)}extractWithChild(j,Q){if(!e.$isRangeSelection(Q))return!1;const F=Q.anchor.getNode(),w=Q.focus.getNode();return this.isParentOf(F)&&this.isParentOf(w)&&this.getTextContent().length===Q.getTextContent().length}isParentRequired(){return!0}createParentElementNode(){return te("bullet")}}function I(H,j,Q){const F=[],w=[],T=j.list,P=T?T.listitem:void 0;let X;if(T&&T.nested&&(X=T.nested.listitem),P!==void 0){const ue=P.split(" ");F.push(...ue)}if(T){const ue=Q.getParent(),pe=he(ue)&&ue.getListType()==="check",se=Q.getChecked();(!pe||se)&&w.push(T.listitemUnchecked),(!pe||!se)&&w.push(T.listitemChecked),pe&&F.push(se?T.listitemChecked:T.listitemUnchecked)}if(X!==void 0){const ue=X.split(" ");Q.getChildren().some(pe=>he(pe))?F.push(...ue):w.push(...ue)}w.length>0&&t.removeClassNamesFromElement(H,...w),F.length>0&&t.addClassNamesToElement(H,...F)}function M(H,j,Q,F){he(j.getFirstChild())?(H.removeAttribute("role"),H.removeAttribute("tabIndex"),H.removeAttribute("aria-checked")):(H.setAttribute("role","checkbox"),H.setAttribute("tabIndex","-1"),(!Q||j.__checked!==Q.__checked)&&H.setAttribute("aria-checked",j.getChecked()?"true":"false"))}function Y(H){const j=t.isHTMLElement(H)&&H.getAttribute("aria-checked")==="true";return{node:ee(j)}}function ee(H){return e.$applyNodeReplacement(new k(void 0,H))}function re(H){return H instanceof k}class Z extends e.ElementNode{static getType(){return"list"}static clone(j){const Q=j.__listType||ge[j.__tag];return new Z(Q,j.__start,j.__key)}constructor(j,Q,F){super(F);const w=ge[j]||j;this.__listType=w,this.__tag=w==="number"?"ol":"ul",this.__start=Q}getTag(){return this.__tag}setListType(j){const Q=this.getWritable();Q.__listType=j,Q.__tag=j==="number"?"ol":"ul"}getListType(){return this.__listType}getStart(){return this.__start}createDOM(j,Q){const F=this.__tag,w=document.createElement(F);return this.__start!==1&&w.setAttribute("start",String(this.__start)),w.__lexicalListType=this.__listType,U(w,j.theme,this),w}updateDOM(j,Q,F){return j.__tag!==this.__tag?!0:(U(Q,F.theme,this),!1)}static importDOM(){return{ol:j=>({conversion:fe,priority:0}),ul:j=>({conversion:fe,priority:0})}}static importJSON(j){const Q=te(j.listType,j.start);return Q.setFormat(j.format),Q.setIndent(j.indent),Q.setDirection(j.direction),Q}exportDOM(j){const{element:Q}=super.exportDOM(j);return Q&&t.isHTMLElement(Q)&&(this.__start!==1&&Q.setAttribute("start",String(this.__start)),this.__listType==="check"&&Q.setAttribute("__lexicalListType","check")),{element:Q}}exportJSON(){return{...super.exportJSON(),listType:this.getListType(),start:this.getStart(),tag:this.getTag(),type:"list",version:1}}canBeEmpty(){return!1}canIndent(){return!1}append(...j){for(let Q=0;Q<j.length;Q++){const F=j[Q];if(re(F))super.append(F);else{const w=ee();if(he(F))w.append(F);else if(e.$isElementNode(F)){const T=e.$createTextNode(F.getTextContent());w.append(T)}else w.append(F);super.append(w)}}return y(this),this}extractWithChild(j){return re(j)}}function U(H,j,Q){const F=[],w=[],T=j.list;if(T!==void 0){const P=T[`${Q.__tag}Depth`]||[],X=n(Q)-1,ue=X%P.length,pe=P[ue],se=T[Q.__tag];let Ce;const Se=T.nested;if(Se!==void 0&&Se.list&&(Ce=Se.list),se!==void 0&&F.push(se),pe!==void 0){const He=pe.split(" ");F.push(...He);for(let le=0;le<P.length;le++)le!==ue&&w.push(Q.__tag+le)}if(Ce!==void 0){const He=Ce.split(" ");X>1?F.push(...He):w.push(...He)}}w.length>0&&t.removeClassNamesFromElement(H,...w),F.length>0&&t.addClassNamesToElement(H,...F)}function J(H){const j=[];for(let Q=0;Q<H.length;Q++){const F=H[Q];if(re(F)){j.push(F);const w=F.getChildren();w.length>1&&w.forEach(T=>{he(T)&&j.push(l(T))})}else j.push(l(F))}return j}function fe(H){const j=H.nodeName.toLowerCase();let Q=null;if(j==="ol"){const F=H.start;Q=te("number",F)}else j==="ul"&&(t.isHTMLElement(H)&&H.getAttribute("__lexicallisttype")==="check"?Q=te("check"):Q=te("bullet"));return{after:J,node:Q}}const ge={ol:"number",ul:"bullet"};function te(H,j=1){return e.$applyNodeReplacement(new Z(H,j))}function he(H){return H instanceof Z}const V=e.createCommand("INSERT_UNORDERED_LIST_COMMAND"),B=e.createCommand("INSERT_ORDERED_LIST_COMMAND"),q=e.createCommand("INSERT_CHECK_LIST_COMMAND"),ie=e.createCommand("REMOVE_LIST_COMMAND");return Ar.$createListItemNode=ee,Ar.$createListNode=te,Ar.$getListDepth=n,Ar.$handleListInsertParagraph=O,Ar.$isListItemNode=re,Ar.$isListNode=he,Ar.INSERT_CHECK_LIST_COMMAND=q,Ar.INSERT_ORDERED_LIST_COMMAND=B,Ar.INSERT_UNORDERED_LIST_COMMAND=V,Ar.ListItemNode=k,Ar.ListNode=Z,Ar.REMOVE_LIST_COMMAND=ie,Ar.insertList=m,Ar.removeList=b,Ar}var Rr={},Gy;function eA(){if(Gy)return Rr;Gy=1;var e=Xt(),t=vn();function n(V){let B=new URLSearchParams;B.append("code",V);for(let q=1;q<arguments.length;q++)B.append("v",arguments[q]);throw Error(`Minified Lexical error #${V}; visit https://lexical.dev/docs/error?${B} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function r(V){let B=1;for(V=V.getParent();V!=null;){if(I(V)){if(V=V.getParent(),J(V)){B++,V=V.getParent();continue}n(40)}break}return B}function o(V){V=V.getParent(),J(V)||n(40);let B=V;for(;B!==null;)B=B.getParent(),J(B)&&(V=B);return V}function i(V){let B=[];V=V.getChildren().filter(I);for(let q=0;q<V.length;q++){let ie=V[q],H=ie.getFirstChild();J(H)?B=B.concat(i(H)):B.push(ie)}return B}function a(V){return I(V)&&J(V.getFirstChild())}function l(V){for(;V.getNextSibling()==null&&V.getPreviousSibling()==null;){let B=V.getParent();if(B==null||!I(V)&&!J(V))break;V=B}V.remove()}function u(V){return k().append(V)}function p(V,B){return I(V)&&(B.length===0||B.length===1&&V.is(B[0])&&V.getChildrenSize()===0)}function m(V,B){V.splice(V.getChildrenSize(),0,B)}function _(V,B){if(J(V))return V;let q=V.getPreviousSibling(),ie=V.getNextSibling(),H=k();return H.setFormat(V.getFormatType()),H.setIndent(V.getIndent()),m(H,V.getChildren()),J(q)&&B===q.getListType()?(q.append(H),V.remove(),J(ie)&&B===ie.getListType()&&(m(q,ie.getChildren()),ie.remove()),q):J(ie)&&B===ie.getListType()?(ie.getFirstChildOrThrow().insertBefore(H),V.remove(),ie):(B=U(B),B.append(H),V.replace(B),C(B),B)}function v(V,B){var q=V.getLastChild();let ie=B.getFirstChild();q&&ie&&a(q)&&a(ie)&&(v(q.getFirstChild(),ie.getFirstChild()),ie.remove()),q=B.getChildren(),0<q.length&&(V.append(...q),C(V)),B.remove()}function C(V,B){if(V=B||V.getChildren(),V!==void 0)for(B=0;B<V.length;B++){let j=V[B];if(I(j)){let Q=j.getValue();var q=j,ie=q.getParent(),H=1;for(ie!=null&&(J(ie)?H=ie.getStart():n(44)),q=q.getPreviousSiblings(),ie=0;ie<q.length;ie++){let F=q[ie];I(F)&&!J(F.getFirstChild())&&H++}Q!==H&&j.setValue(H)}}}function b(V){if(!a(V)){var B=V.getParent(),q=B?B.getParent():void 0,ie=q?q.getParent():void 0;if(J(ie)&&I(q)&&J(B)){var H=B?B.getFirstChild():void 0,j=B?B.getLastChild():void 0;if(V.is(H))q.insertBefore(V),B.isEmpty()&&q.remove();else if(V.is(j))q.insertAfter(V),B.isEmpty()&&q.remove();else{var Q=B.getListType();H=k();let F=U(Q);H.append(F),V.getPreviousSiblings().forEach(w=>F.append(w)),j=k(),Q=U(Q),j.append(Q),m(Q,V.getNextSiblings()),q.insertBefore(H),q.insertAfter(j),q.replace(V)}C(B),C(ie)}}}class y extends e.ElementNode{static getType(){return"listitem"}static clone(B){return new y(B.__value,B.__checked,B.__key)}constructor(B,q,ie){super(ie),this.__value=B===void 0?1:B,this.__checked=q}createDOM(B){let q=document.createElement("li"),ie=this.getParent();return J(ie)&&ie.getListType()==="check"&&R(q,this,null),q.value=this.__value,N(q,B.theme,this),q}updateDOM(B,q,ie){let H=this.getParent();return J(H)&&H.getListType()==="check"&&R(q,this,B),q.value=this.__value,N(q,ie.theme,this),!1}static transform(){return B=>{let q=B.getParent();J(q)&&(C(q),q.getListType()!=="check"&&B.getChecked()!=null&&B.setChecked(void 0))}}static importDOM(){return{li:()=>({conversion:O,priority:0})}}static importJSON(B){let q=k();return q.setChecked(B.checked),q.setValue(B.value),q.setFormat(B.format),q.setDirection(B.direction),q}exportDOM(B){return B=this.createDOM(B._config),B.style.textAlign=this.getFormatType(),{element:B}}exportJSON(){return{...super.exportJSON(),checked:this.getChecked(),type:"listitem",value:this.getValue(),version:1}}append(...B){for(let q=0;q<B.length;q++){let ie=B[q];if(e.$isElementNode(ie)&&this.canMergeWith(ie)){let H=ie.getChildren();this.append(...H),ie.remove()}else super.append(ie)}return this}replace(B,q){if(I(B))return super.replace(B);this.setIndent(0);let ie=this.getParentOrThrow();if(!J(ie))return B;if(ie.__first===this.getKey())ie.insertBefore(B);else if(ie.__last===this.getKey())ie.insertAfter(B);else{let H=U(ie.getListType()),j=this.getNextSibling();for(;j;){let Q=j;j=j.getNextSibling(),H.append(Q)}ie.insertAfter(B),B.insertAfter(H)}return q&&this.getChildren().forEach(H=>{B.append(H)}),this.remove(),ie.getChildrenSize()===0&&ie.remove(),B}insertAfter(B,q=!0){var ie=this.getParentOrThrow();J(ie)||n(39);var H=this.getNextSiblings();if(I(B))return q=super.insertAfter(B,q),B=B.getParentOrThrow(),J(B)&&C(B),q;if(J(B)){for(ie=B,B=B.getChildren(),H=B.length-1;0<=H;H--)ie=B[H],this.insertAfter(ie,q);return ie}if(ie.insertAfter(B,q),H.length!==0){let j=U(ie.getListType());H.forEach(Q=>j.append(Q)),B.insertAfter(j,q)}return B}remove(B){let q=this.getPreviousSibling(),ie=this.getNextSibling();super.remove(B),q&&ie&&a(q)&&a(ie)?(v(q.getFirstChild(),ie.getFirstChild()),ie.remove()):ie&&(B=ie.getParent(),J(B)&&C(B))}insertNewAfter(B,q=!0){return B=k(this.__checked==null?void 0:!1),this.insertAfter(B,q),B}collapseAtStart(B){let q=e.$createParagraphNode();this.getChildren().forEach(Q=>q.append(Q));var ie=this.getParentOrThrow(),H=ie.getParentOrThrow();let j=I(H);return ie.getChildrenSize()===1?j?(ie.remove(),H.select()):(ie.insertBefore(q),ie.remove(),ie=B.anchor,B=B.focus,H=q.getKey(),ie.type==="element"&&ie.getNode().is(this)&&ie.set(H,ie.offset,"element"),B.type==="element"&&B.getNode().is(this)&&B.set(H,B.offset,"element")):(ie.insertBefore(q),this.remove()),!0}getValue(){return this.getLatest().__value}setValue(B){this.getWritable().__value=B}getChecked(){return this.getLatest().__checked}setChecked(B){this.getWritable().__checked=B}toggleChecked(){this.setChecked(!this.__checked)}getIndent(){var B=this.getParent();if(B===null)return this.getLatest().__indent;B=B.getParentOrThrow();let q=0;for(;I(B);)B=B.getParentOrThrow().getParentOrThrow(),q++;return q}setIndent(B){typeof B=="number"&&-1<B||n(117);let q=this.getIndent();for(;q!==B;)if(q<B){e:{var ie=new Set;if(a(this)||ie.has(this.getKey()))break e;let F=this.getParent();var H=this.getNextSibling(),j=this.getPreviousSibling();if(a(H)&&a(j)){if(j=j.getFirstChild(),J(j)){j.append(this);var Q=H.getFirstChild();J(Q)&&(Q=Q.getChildren(),m(j,Q),H.remove(),ie.add(H.getKey())),C(j)}}else a(H)?(H=H.getFirstChild(),J(H)&&(ie=H.getFirstChild(),ie!==null&&ie.insertBefore(this),C(H))):a(j)?(H=j.getFirstChild(),J(H)&&(H.append(this),C(H))):J(F)&&(ie=k(),Q=U(F.getListType()),ie.append(Q),Q.append(this),j?j.insertAfter(ie):H?H.insertBefore(ie):F.append(ie),C(Q));J(F)&&C(F)}q++}else b(this),q--;return this}insertBefore(B){if(I(B)){let q=this.getParentOrThrow();if(J(q)){let ie=this.getNextSiblings();C(q,ie)}}return super.insertBefore(B)}canInsertAfter(B){return I(B)}canReplaceWith(B){return I(B)}canMergeWith(B){return e.$isParagraphNode(B)||I(B)}extractWithChild(B,q){if(!e.$isRangeSelection(q))return!1;B=q.anchor.getNode();let ie=q.focus.getNode();return this.isParentOf(B)&&this.isParentOf(ie)&&this.getTextContent().length===q.getTextContent().length}isParentRequired(){return!0}createParentElementNode(){return U("bullet")}}function N(V,B,q){let ie=[],H=[];var j=(B=B.list)?B.listitem:void 0;if(B&&B.nested)var Q=B.nested.listitem;if(j!==void 0&&(j=j.split(" "),ie.push(...j)),B){j=q.getParent(),j=J(j)&&j.getListType()==="check";let F=q.getChecked();j&&!F||H.push(B.listitemUnchecked),j&&F||H.push(B.listitemChecked),j&&ie.push(F?B.listitemChecked:B.listitemUnchecked)}Q!==void 0&&(Q=Q.split(" "),q.getChildren().some(F=>J(F))?ie.push(...Q):H.push(...Q)),0<H.length&&t.removeClassNamesFromElement(V,...H),0<ie.length&&t.addClassNamesToElement(V,...ie)}function R(V,B,q){J(B.getFirstChild())?(V.removeAttribute("role"),V.removeAttribute("tabIndex"),V.removeAttribute("aria-checked")):(V.setAttribute("role","checkbox"),V.setAttribute("tabIndex","-1"),q&&B.__checked===q.__checked||V.setAttribute("aria-checked",B.getChecked()?"true":"false"))}function O(V){return V=t.isHTMLElement(V)&&V.getAttribute("aria-checked")==="true",{node:k(V)}}function k(V){return e.$applyNodeReplacement(new y(void 0,V))}function I(V){return V instanceof y}class M extends e.ElementNode{static getType(){return"list"}static clone(B){return new M(B.__listType||Z[B.__tag],B.__start,B.__key)}constructor(B,q,ie){super(ie),this.__listType=B=Z[B]||B,this.__tag=B==="number"?"ol":"ul",this.__start=q}getTag(){return this.__tag}setListType(B){let q=this.getWritable();q.__listType=B,q.__tag=B==="number"?"ol":"ul"}getListType(){return this.__listType}getStart(){return this.__start}createDOM(B){let q=document.createElement(this.__tag);return this.__start!==1&&q.setAttribute("start",String(this.__start)),q.__lexicalListType=this.__listType,Y(q,B.theme,this),q}updateDOM(B,q,ie){return B.__tag!==this.__tag?!0:(Y(q,ie.theme,this),!1)}static importDOM(){return{ol:()=>({conversion:re,priority:0}),ul:()=>({conversion:re,priority:0})}}static importJSON(B){let q=U(B.listType,B.start);return q.setFormat(B.format),q.setIndent(B.indent),q.setDirection(B.direction),q}exportDOM(B){return{element:B}=super.exportDOM(B),B&&t.isHTMLElement(B)&&(this.__start!==1&&B.setAttribute("start",String(this.__start)),this.__listType==="check"&&B.setAttribute("__lexicalListType","check")),{element:B}}exportJSON(){return{...super.exportJSON(),listType:this.getListType(),start:this.getStart(),tag:this.getTag(),type:"list",version:1}}canBeEmpty(){return!1}canIndent(){return!1}append(...B){for(let ie=0;ie<B.length;ie++){var q=B[ie];if(I(q))super.append(q);else{let H=k();J(q)||e.$isElementNode(q)&&(q=e.$createTextNode(q.getTextContent())),H.append(q),super.append(H)}}return C(this),this}extractWithChild(B){return I(B)}}function Y(V,B,q){let ie=[],H=[];var j=B.list;if(j!==void 0){let F=j[`${q.__tag}Depth`]||[];B=r(q)-1;let w=B%F.length;var Q=F[w];let T=j[q.__tag],P;if(j=j.nested,j!==void 0&&j.list&&(P=j.list),T!==void 0&&ie.push(T),Q!==void 0)for(Q=Q.split(" "),ie.push(...Q),Q=0;Q<F.length;Q++)Q!==w&&H.push(q.__tag+Q);P!==void 0&&(q=P.split(" "),1<B?ie.push(...q):H.push(...q))}0<H.length&&t.removeClassNamesFromElement(V,...H),0<ie.length&&t.addClassNamesToElement(V,...ie)}function ee(V){let B=[];for(let ie=0;ie<V.length;ie++){var q=V[ie];I(q)?(B.push(q),q=q.getChildren(),1<q.length&&q.forEach(H=>{J(H)&&B.push(u(H))})):B.push(u(q))}return B}function re(V){let B=V.nodeName.toLowerCase(),q=null;return B==="ol"?q=U("number",V.start):B==="ul"&&(q=t.isHTMLElement(V)&&V.getAttribute("__lexicallisttype")==="check"?U("check"):U("bullet")),{after:ee,node:q}}let Z={ol:"number",ul:"bullet"};function U(V,B=1){return e.$applyNodeReplacement(new M(V,B))}function J(V){return V instanceof M}let fe=e.createCommand("INSERT_UNORDERED_LIST_COMMAND"),ge=e.createCommand("INSERT_ORDERED_LIST_COMMAND"),te=e.createCommand("INSERT_CHECK_LIST_COMMAND"),he=e.createCommand("REMOVE_LIST_COMMAND");return Rr.$createListItemNode=k,Rr.$createListNode=U,Rr.$getListDepth=r,Rr.$handleListInsertParagraph=function(){var V=e.$getSelection();if(!e.$isRangeSelection(V)||!V.isCollapsed()||(V=V.anchor.getNode(),!I(V)||V.getChildrenSize()!==0))return!1;var B=o(V),q=V.getParent();J(q)||n(40);let ie=q.getParent(),H;if(e.$isRootOrShadowRoot(ie))H=e.$createParagraphNode(),B.insertAfter(H);else if(I(ie))H=k(),ie.insertAfter(H);else return!1;if(H.select(),B=V.getNextSiblings(),0<B.length){let j=U(q.getListType());e.$isParagraphNode(H)?H.insertAfter(j):(q=k(),q.append(j),H.insertAfter(q)),B.forEach(Q=>{Q.remove(),j.append(Q)})}return l(V),!0},Rr.$isListItemNode=I,Rr.$isListNode=J,Rr.INSERT_CHECK_LIST_COMMAND=te,Rr.INSERT_ORDERED_LIST_COMMAND=ge,Rr.INSERT_UNORDERED_LIST_COMMAND=fe,Rr.ListItemNode=y,Rr.ListNode=M,Rr.REMOVE_LIST_COMMAND=he,Rr.insertList=function(V,B){V.update(()=>{var q=e.$getSelection();if(e.$INTERNAL_isPointSelection(q)){var ie=q.getNodes();q=q.anchor.getNode();var H=q.getParent();if(p(q,ie))ie=U(B),e.$isRootOrShadowRoot(H)?(q.replace(ie),H=k(),e.$isElementNode(q)&&(H.setFormat(q.getFormatType()),H.setIndent(q.getIndent())),ie.append(H)):I(q)&&(q=q.getParentOrThrow(),m(ie,q.getChildren()),q.replace(ie));else for(q=new Set,H=0;H<ie.length;H++){var j=ie[H];if(e.$isElementNode(j)&&j.isEmpty()&&!I(j)&&!q.has(j.getKey()))_(j,B);else if(e.$isLeafNode(j))for(j=j.getParent();j!=null;){let F=j.getKey();if(J(j)){if(!q.has(F)){var Q=U(B);m(Q,j.getChildren()),j.replace(Q),C(Q),q.add(F)}break}else{if(Q=j.getParent(),e.$isRootOrShadowRoot(Q)&&!q.has(F)){q.add(F),_(j,B);break}j=Q}}}}})},Rr.removeList=function(V){V.update(()=>{let B=e.$getSelection();if(e.$isRangeSelection(B)){var q=new Set,ie=B.getNodes(),H=B.anchor.getNode();if(p(H,ie))q.add(o(H));else for(H=0;H<ie.length;H++){var j=ie[H];e.$isLeafNode(j)&&(j=t.$getNearestNodeOfType(j,y),j!=null&&q.add(o(j)))}for(let Q of q){q=Q,ie=i(Q);for(let F of ie)ie=e.$createParagraphNode(),m(ie,F.getChildren()),q.insertAfter(ie),q=ie,F.__key===B.anchor.key&&B.anchor.set(ie.getKey(),0,"element"),F.__key===B.focus.key&&B.focus.set(ie.getKey(),0,"element"),F.remove();Q.remove()}}})},Rr}var Uy,Vy;function Dg(){return Vy||(Vy=1,Uy=process.env.NODE_ENV==="development"?QO():eA()),Uy}var Yy;function tA(){if(Yy)return Wh;Yy=1;var e=Dg(),t=ur(),n=z,r=vn(),o=Xt();function i(l){n.useEffect(()=>r.mergeRegister(l.registerCommand(e.INSERT_ORDERED_LIST_COMMAND,()=>(e.insertList(l,"number"),!0),o.COMMAND_PRIORITY_LOW),l.registerCommand(e.INSERT_UNORDERED_LIST_COMMAND,()=>(e.insertList(l,"bullet"),!0),o.COMMAND_PRIORITY_LOW),l.registerCommand(e.REMOVE_LIST_COMMAND,()=>(e.removeList(l),!0),o.COMMAND_PRIORITY_LOW),l.registerCommand(o.INSERT_PARAGRAPH_COMMAND,()=>!!e.$handleListInsertParagraph(),o.COMMAND_PRIORITY_LOW)),[l])}function a(){const[l]=t.useLexicalComposerContext();return n.useEffect(()=>{if(!l.hasNodes([e.ListNode,e.ListItemNode]))throw new Error("ListPlugin: ListNode and/or ListItemNode not registered on editor")},[l]),i(l),null}return Wh.ListPlugin=a,Wh}var zh={},qy;function nA(){if(qy)return zh;qy=1;var e=Dg(),t=ur(),n=z,r=vn(),o=Xt();function i(a){n.useEffect(()=>r.mergeRegister(a.registerCommand(e.INSERT_ORDERED_LIST_COMMAND,()=>(e.insertList(a,"number"),!0),o.COMMAND_PRIORITY_LOW),a.registerCommand(e.INSERT_UNORDERED_LIST_COMMAND,()=>(e.insertList(a,"bullet"),!0),o.COMMAND_PRIORITY_LOW),a.registerCommand(e.REMOVE_LIST_COMMAND,()=>(e.removeList(a),!0),o.COMMAND_PRIORITY_LOW),a.registerCommand(o.INSERT_PARAGRAPH_COMMAND,()=>!!e.$handleListInsertParagraph(),o.COMMAND_PRIORITY_LOW)),[a])}return zh.ListPlugin=function(){let[a]=t.useLexicalComposerContext();return n.useEffect(()=>{if(!a.hasNodes([e.ListNode,e.ListItemNode]))throw Error("ListPlugin: ListNode and/or ListItemNode not registered on editor")},[a]),i(a),null},zh}process.env.NODE_ENV==="development"?tA():nA();var Kh={},fi={},Zy;function rA(){if(Zy)return fi;Zy=1;var e=vn(),t=Xt();const n=new Set(["http:","https:","mailto:","sms:","tel:"]);class r extends t.ElementNode{static getType(){return"link"}static clone(b){return new r(b.__url,{rel:b.__rel,target:b.__target,title:b.__title},b.__key)}constructor(b,y={},N){super(N);const{target:R=null,rel:O=null,title:k=null}=y;this.__url=b,this.__target=R,this.__rel=O,this.__title=k}createDOM(b){const y=document.createElement("a");return y.href=this.sanitizeUrl(this.__url),this.__target!==null&&(y.target=this.__target),this.__rel!==null&&(y.rel=this.__rel),this.__title!==null&&(y.title=this.__title),e.addClassNamesToElement(y,b.theme.link),y}updateDOM(b,y,N){const R=this.__url,O=this.__target,k=this.__rel,I=this.__title;return R!==b.__url&&(y.href=R),O!==b.__target&&(O?y.target=O:y.removeAttribute("target")),k!==b.__rel&&(k?y.rel=k:y.removeAttribute("rel")),I!==b.__title&&(I?y.title=I:y.removeAttribute("title")),!1}static importDOM(){return{a:b=>({conversion:o,priority:1})}}static importJSON(b){const y=i(b.url,{rel:b.rel,target:b.target,title:b.title});return y.setFormat(b.format),y.setIndent(b.indent),y.setDirection(b.direction),y}sanitizeUrl(b){try{const y=new URL(b);if(!n.has(y.protocol))return"about:blank"}catch{return b}return b}exportJSON(){return{...super.exportJSON(),rel:this.getRel(),target:this.getTarget(),title:this.getTitle(),type:"link",url:this.getURL(),version:1}}getURL(){return this.getLatest().__url}setURL(b){const y=this.getWritable();y.__url=b}getTarget(){return this.getLatest().__target}setTarget(b){const y=this.getWritable();y.__target=b}getRel(){return this.getLatest().__rel}setRel(b){const y=this.getWritable();y.__rel=b}getTitle(){return this.getLatest().__title}setTitle(b){const y=this.getWritable();y.__title=b}insertNewAfter(b,y=!0){const N=i(this.__url,{rel:this.__rel,target:this.__target,title:this.__title});return this.insertAfter(N,y),N}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}canBeEmpty(){return!1}isInline(){return!0}extractWithChild(b,y,N){if(!t.$isRangeSelection(y))return!1;const R=y.anchor.getNode(),O=y.focus.getNode();return this.isParentOf(R)&&this.isParentOf(O)&&y.getTextContent().length>0}}function o(C){let b=null;if(e.isHTMLAnchorElement(C)){const y=C.textContent;(y!==null&&y!==""||C.children.length>0)&&(b=i(C.getAttribute("href")||"",{rel:C.getAttribute("rel"),target:C.getAttribute("target"),title:C.getAttribute("title")}))}return{node:b}}function i(C,b){return t.$applyNodeReplacement(new r(C,b))}function a(C){return C instanceof r}class l extends r{static getType(){return"autolink"}static clone(b){return new l(b.__url,{rel:b.__rel,target:b.__target,title:b.__title},b.__key)}static importJSON(b){const y=u(b.url,{rel:b.rel,target:b.target,title:b.title});return y.setFormat(b.format),y.setIndent(b.indent),y.setDirection(b.direction),y}static importDOM(){return null}exportJSON(){return{...super.exportJSON(),type:"autolink",version:1}}insertNewAfter(b,y=!0){const N=this.getParentOrThrow().insertNewAfter(b,y);if(t.$isElementNode(N)){const R=u(this.__url,{rel:this.__rel,target:this.__target,title:this.__title});return N.append(R),R}return null}}function u(C,b){return t.$applyNodeReplacement(new l(C,b))}function p(C){return C instanceof l}const m=t.createCommand("TOGGLE_LINK_COMMAND");function _(C,b={}){const{target:y,title:N}=b,R=b.rel===void 0?"noreferrer":b.rel,O=t.$getSelection();if(!t.$isRangeSelection(O))return;const k=O.extract();if(C===null)k.forEach(I=>{const M=I.getParent();if(a(M)){const Y=M.getChildren();for(let ee=0;ee<Y.length;ee++)M.insertBefore(Y[ee]);M.remove()}});else{if(k.length===1){const Y=k[0],ee=v(Y,a);if(ee!==null){ee.setURL(C),y!==void 0&&ee.setTarget(y),R!==null&&ee.setRel(R),N!==void 0&&ee.setTitle(N);return}}let I=null,M=null;k.forEach(Y=>{const ee=Y.getParent();if(!(ee===M||ee===null||t.$isElementNode(Y)&&!Y.isInline())){if(a(ee)){M=ee,ee.setURL(C),y!==void 0&&ee.setTarget(y),R!==null&&M.setRel(R),N!==void 0&&M.setTitle(N);return}if(ee.is(I)||(I=ee,M=i(C,{rel:R,target:y,title:N}),a(ee)?Y.getPreviousSibling()===null?ee.insertBefore(M):ee.insertAfter(M):Y.insertBefore(M)),a(Y)){if(Y.is(M))return;if(M!==null){const re=Y.getChildren();for(let Z=0;Z<re.length;Z++)M.append(re[Z])}Y.remove();return}M!==null&&M.append(Y)}})}}function v(C,b){let y=C;for(;y!==null&&y.getParent()!==null&&!b(y);)y=y.getParentOrThrow();return b(y)?y:null}return fi.$createAutoLinkNode=u,fi.$createLinkNode=i,fi.$isAutoLinkNode=p,fi.$isLinkNode=a,fi.AutoLinkNode=l,fi.LinkNode=r,fi.TOGGLE_LINK_COMMAND=m,fi.toggleLink=_,fi}var hi={},Jy;function oA(){if(Jy)return hi;Jy=1;var e=vn(),t=Xt();let n=new Set(["http:","https:","mailto:","sms:","tel:"]);class r extends t.ElementNode{static getType(){return"link"}static clone(v){return new r(v.__url,{rel:v.__rel,target:v.__target,title:v.__title},v.__key)}constructor(v,C={},b){super(b);let{target:y=null,rel:N=null,title:R=null}=C;this.__url=v,this.__target=y,this.__rel=N,this.__title=R}createDOM(v){let C=document.createElement("a");return C.href=this.sanitizeUrl(this.__url),this.__target!==null&&(C.target=this.__target),this.__rel!==null&&(C.rel=this.__rel),this.__title!==null&&(C.title=this.__title),e.addClassNamesToElement(C,v.theme.link),C}updateDOM(v,C){let b=this.__url,y=this.__target,N=this.__rel,R=this.__title;return b!==v.__url&&(C.href=b),y!==v.__target&&(y?C.target=y:C.removeAttribute("target")),N!==v.__rel&&(N?C.rel=N:C.removeAttribute("rel")),R!==v.__title&&(R?C.title=R:C.removeAttribute("title")),!1}static importDOM(){return{a:()=>({conversion:o,priority:1})}}static importJSON(v){let C=i(v.url,{rel:v.rel,target:v.target,title:v.title});return C.setFormat(v.format),C.setIndent(v.indent),C.setDirection(v.direction),C}sanitizeUrl(v){try{let C=new URL(v);if(!n.has(C.protocol))return"about:blank"}catch{}return v}exportJSON(){return{...super.exportJSON(),rel:this.getRel(),target:this.getTarget(),title:this.getTitle(),type:"link",url:this.getURL(),version:1}}getURL(){return this.getLatest().__url}setURL(v){this.getWritable().__url=v}getTarget(){return this.getLatest().__target}setTarget(v){this.getWritable().__target=v}getRel(){return this.getLatest().__rel}setRel(v){this.getWritable().__rel=v}getTitle(){return this.getLatest().__title}setTitle(v){this.getWritable().__title=v}insertNewAfter(v,C=!0){return v=i(this.__url,{rel:this.__rel,target:this.__target,title:this.__title}),this.insertAfter(v,C),v}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}canBeEmpty(){return!1}isInline(){return!0}extractWithChild(v,C){if(!t.$isRangeSelection(C))return!1;v=C.anchor.getNode();let b=C.focus.getNode();return this.isParentOf(v)&&this.isParentOf(b)&&0<C.getTextContent().length}}function o(_){let v=null;if(e.isHTMLAnchorElement(_)){let C=_.textContent;(C!==null&&C!==""||0<_.children.length)&&(v=i(_.getAttribute("href")||"",{rel:_.getAttribute("rel"),target:_.getAttribute("target"),title:_.getAttribute("title")}))}return{node:v}}function i(_,v){return t.$applyNodeReplacement(new r(_,v))}function a(_){return _ instanceof r}class l extends r{static getType(){return"autolink"}static clone(v){return new l(v.__url,{rel:v.__rel,target:v.__target,title:v.__title},v.__key)}static importJSON(v){let C=u(v.url,{rel:v.rel,target:v.target,title:v.title});return C.setFormat(v.format),C.setIndent(v.indent),C.setDirection(v.direction),C}static importDOM(){return null}exportJSON(){return{...super.exportJSON(),type:"autolink",version:1}}insertNewAfter(v,C=!0){return v=this.getParentOrThrow().insertNewAfter(v,C),t.$isElementNode(v)?(C=u(this.__url,{rel:this.__rel,target:this.__target,title:this.__title}),v.append(C),C):null}}function u(_,v){return t.$applyNodeReplacement(new l(_,v))}let p=t.createCommand("TOGGLE_LINK_COMMAND");function m(_,v){for(;_!==null&&_.getParent()!==null&&!v(_);)_=_.getParentOrThrow();return v(_)?_:null}return hi.$createAutoLinkNode=u,hi.$createLinkNode=i,hi.$isAutoLinkNode=function(_){return _ instanceof l},hi.$isLinkNode=a,hi.AutoLinkNode=l,hi.LinkNode=r,hi.TOGGLE_LINK_COMMAND=p,hi.toggleLink=function(_,v={}){let{target:C,title:b}=v,y=v.rel===void 0?"noreferrer":v.rel;if(v=t.$getSelection(),t.$isRangeSelection(v))if(v=v.extract(),_===null)v.forEach(N=>{if(N=N.getParent(),a(N)){let R=N.getChildren();for(let O=0;O<R.length;O++)N.insertBefore(R[O]);N.remove()}});else{if(v.length===1){let O=m(v[0],a);if(O!==null){O.setURL(_),C!==void 0&&O.setTarget(C),y!==null&&O.setRel(y),b!==void 0&&O.setTitle(b);return}}let N=null,R=null;v.forEach(O=>{var k=O.getParent();if(k!==R&&k!==null&&(!t.$isElementNode(O)||O.isInline()))if(a(k))R=k,k.setURL(_),C!==void 0&&k.setTarget(C),y!==null&&R.setRel(y),b!==void 0&&R.setTitle(b);else if(k.is(N)||(N=k,R=i(_,{rel:y,target:C,title:b}),a(k)?O.getPreviousSibling()===null?k.insertBefore(R):k.insertAfter(R):O.insertBefore(R)),a(O)){if(!O.is(R)){if(R!==null){k=O.getChildren();for(let I=0;I<k.length;I++)R.append(k[I])}O.remove()}}else R!==null&&R.append(O)})}},hi}var Xy,Qy;function Mg(){return Qy||(Qy=1,Xy=process.env.NODE_ENV==="development"?rA():oA()),Xy}var e0;function iA(){if(e0)return Kh;e0=1;var e=Mg(),t=ur(),n=vn(),r=Xt(),o=z;function i({validateUrl:a}){const[l]=t.useLexicalComposerContext();return o.useEffect(()=>{if(!l.hasNodes([e.LinkNode]))throw new Error("LinkPlugin: LinkNode not registered on editor");return n.mergeRegister(l.registerCommand(e.TOGGLE_LINK_COMMAND,u=>{if(u===null)return e.toggleLink(u),!0;if(typeof u=="string")return a===void 0||a(u)?(e.toggleLink(u),!0):!1;{const{url:p,target:m,rel:_,title:v}=u;return e.toggleLink(p,{rel:_,target:m,title:v}),!0}},r.COMMAND_PRIORITY_LOW),a!==void 0?l.registerCommand(r.PASTE_COMMAND,u=>{const p=r.$getSelection();if(!r.$isRangeSelection(p)||p.isCollapsed()||!(u instanceof ClipboardEvent)||u.clipboardData==null)return!1;const m=u.clipboardData.getData("text");return a(m)?p.getNodes().some(_=>r.$isElementNode(_))?!1:(l.dispatchCommand(e.TOGGLE_LINK_COMMAND,m),u.preventDefault(),!0):!1},r.COMMAND_PRIORITY_LOW):()=>{})},[l,a]),null}return Kh.LinkPlugin=i,Kh}var Gh={},t0;function aA(){if(t0)return Gh;t0=1;var e=Mg(),t=ur(),n=vn(),r=Xt(),o=z;return Gh.LinkPlugin=function({validateUrl:i}){let[a]=t.useLexicalComposerContext();return o.useEffect(()=>{if(!a.hasNodes([e.LinkNode]))throw Error("LinkPlugin: LinkNode not registered on editor");return n.mergeRegister(a.registerCommand(e.TOGGLE_LINK_COMMAND,l=>{if(l===null)return e.toggleLink(l),!0;if(typeof l=="string")return i===void 0||i(l)?(e.toggleLink(l),!0):!1;let{url:u,target:p,rel:m,title:_}=l;return e.toggleLink(u,{rel:m,target:p,title:_}),!0},r.COMMAND_PRIORITY_LOW),i!==void 0?a.registerCommand(r.PASTE_COMMAND,l=>{let u=r.$getSelection();if(!r.$isRangeSelection(u)||u.isCollapsed()||!(l instanceof ClipboardEvent)||l.clipboardData==null)return!1;let p=l.clipboardData.getData("text");return i(p)?u.getNodes().some(m=>r.$isElementNode(m))?!1:(a.dispatchCommand(e.TOGGLE_LINK_COMMAND,p),l.preventDefault(),!0):!1},r.COMMAND_PRIORITY_LOW):()=>{})},[a,i]),null},Gh}process.env.NODE_ENV==="development"?iA():aA();var Uh={},tn={},n0;function sA(){if(n0)return tn;n0=1;var e=Xt(),t=vn();const n=/^(\d+(?:\.\d+)?)px$/,r={BOTH:3,COLUMN:2,NO_STATUS:0,ROW:1};class o extends e.DEPRECATED_GridCellNode{static getType(){return"tablecell"}static clone(me){const _e=new o(me.__headerState,me.__colSpan,me.__width,me.__key);return _e.__rowSpan=me.__rowSpan,_e.__backgroundColor=me.__backgroundColor,_e}static importDOM(){return{td:me=>({conversion:i,priority:0}),th:me=>({conversion:i,priority:0})}}static importJSON(me){const _e=me.colSpan||1,De=me.rowSpan||1,je=a(me.headerState,_e,me.width||void 0);return je.__rowSpan=De,je.__backgroundColor=me.backgroundColor||null,je}constructor(me=r.NO_STATUS,_e=1,De,je){super(_e,je),this.__headerState=me,this.__width=De,this.__backgroundColor=null}createDOM(me){const _e=document.createElement(this.getTag());return this.__width&&(_e.style.width=`${this.__width}px`),this.__colSpan>1&&(_e.colSpan=this.__colSpan),this.__rowSpan>1&&(_e.rowSpan=this.__rowSpan),this.__backgroundColor!==null&&(_e.style.backgroundColor=this.__backgroundColor),t.addClassNamesToElement(_e,me.theme.tableCell,this.hasHeader()&&me.theme.tableCellHeader),_e}exportDOM(me){const{element:_e}=super.exportDOM(me);if(_e){const De=_e,je=700,Me=this.getParentOrThrow().getChildrenSize();De.style.border="1px solid black",this.__colSpan>1&&(De.colSpan=this.__colSpan),this.__rowSpan>1&&(De.rowSpan=this.__rowSpan),De.style.width=`${this.getWidth()||Math.max(90,je/Me)}px`,De.style.verticalAlign="top",De.style.textAlign="start";const We=this.getBackgroundColor();We!==null?De.style.backgroundColor=We:this.hasHeader()&&(De.style.backgroundColor="#f2f3f5")}return{element:_e}}exportJSON(){return{...super.exportJSON(),backgroundColor:this.getBackgroundColor(),headerState:this.__headerState,type:"tablecell",width:this.getWidth()}}getTag(){return this.hasHeader()?"th":"td"}setHeaderStyles(me){const _e=this.getWritable();return _e.__headerState=me,this.__headerState}getHeaderStyles(){return this.getLatest().__headerState}setWidth(me){const _e=this.getWritable();return _e.__width=me,this.__width}getWidth(){return this.getLatest().__width}getBackgroundColor(){return this.getLatest().__backgroundColor}setBackgroundColor(me){this.getWritable().__backgroundColor=me}toggleHeaderStyle(me){const _e=this.getWritable();return(_e.__headerState&me)===me?_e.__headerState-=me:_e.__headerState+=me,_e}hasHeaderState(me){return(this.getHeaderStyles()&me)===me}hasHeader(){return this.getLatest().__headerState!==r.NO_STATUS}updateDOM(me){return me.__headerState!==this.__headerState||me.__width!==this.__width||me.__colSpan!==this.__colSpan||me.__rowSpan!==this.__rowSpan||me.__backgroundColor!==this.__backgroundColor}isShadowRoot(){return!0}collapseAtStart(){return!0}canBeEmpty(){return!1}canIndent(){return!1}}function i(Ae){const me=Ae,_e=Ae.nodeName.toLowerCase();let De;n.test(me.style.width)&&(De=parseFloat(me.style.width));const je=a(_e==="th"?r.ROW:r.NO_STATUS,me.colSpan,De);je.__rowSpan=me.rowSpan;const Me=me.style.backgroundColor;return Me!==""&&(je.__backgroundColor=Me),{forChild:(We,tt)=>{if(l(tt)&&!e.$isElementNode(We)){const ht=e.$createParagraphNode();return e.$isLineBreakNode(We)&&We.getTextContent()===`
|
|
101
|
-
`?null:(ht.append(We),ht)}return We},node:je}}function a(Ae,me=1,_e){return e.$applyNodeReplacement(new o(Ae,me,_e))}function l(Ae){return Ae instanceof o}class u extends e.DEPRECATED_GridRowNode{static getType(){return"tablerow"}static clone(me){return new u(me.__height,me.__key)}static importDOM(){return{tr:me=>({conversion:p,priority:0})}}static importJSON(me){return m(me.height)}constructor(me,_e){super(_e),this.__height=me}exportJSON(){return{...super.exportJSON(),type:"tablerow",version:1}}createDOM(me){const _e=document.createElement("tr");return this.__height&&(_e.style.height=`${this.__height}px`),t.addClassNamesToElement(_e,me.theme.tableRow),_e}isShadowRoot(){return!0}setHeight(me){const _e=this.getWritable();return _e.__height=me,this.__height}getHeight(){return this.getLatest().__height}updateDOM(me){return me.__height!==this.__height}canBeEmpty(){return!1}canIndent(){return!1}}function p(Ae){const me=Ae;let _e;return n.test(me.style.height)&&(_e=parseFloat(me.style.height)),{node:m(_e)}}function m(Ae){return e.$applyNodeReplacement(new u(Ae))}function _(Ae){return Ae instanceof u}const v=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",C=Ae=>v?(Ae||window).getSelection():null;class b{constructor(me,_e){this.isHighlightingCells=!1,this.anchorX=-1,this.anchorY=-1,this.focusX=-1,this.focusY=-1,this.listenersToRemove=new Set,this.tableNodeKey=_e,this.editor=me,this.grid={cells:[],columns:0,rows:0},this.gridSelection=null,this.anchorCellNodeKey=null,this.focusCellNodeKey=null,this.anchorCell=null,this.focusCell=null,this.hasHijackedSelectionStyles=!1,this.trackTableGrid()}getGrid(){return this.grid}removeListeners(){Array.from(this.listenersToRemove).forEach(me=>me())}trackTableGrid(){const me=new MutationObserver(_e=>{this.editor.update(()=>{let De=!1;for(let Me=0;Me<_e.length;Me++){const We=_e[Me].target.nodeName;if(We==="TABLE"||We==="TR"){De=!0;break}}if(!De)return;const je=this.editor.getElementByKey(this.tableNodeKey);if(!je)throw new Error("Expected to find TableElement in DOM");this.grid=I(je)})});this.editor.update(()=>{const _e=this.editor.getElementByKey(this.tableNodeKey);if(!_e)throw new Error("Expected to find TableElement in DOM");this.grid=I(_e),me.observe(_e,{childList:!0,subtree:!0})})}clearHighlight(){const me=this.editor;this.isHighlightingCells=!1,this.anchorX=-1,this.anchorY=-1,this.focusX=-1,this.focusY=-1,this.gridSelection=null,this.anchorCellNodeKey=null,this.focusCellNodeKey=null,this.anchorCell=null,this.focusCell=null,this.hasHijackedSelectionStyles=!1,this.enableHighlightStyle(),me.update(()=>{const _e=e.$getNodeByKey(this.tableNodeKey);if(!w(_e))throw new Error("Expected TableNode.");const De=me.getElementByKey(this.tableNodeKey);if(!De)throw new Error("Expected to find TableElement in DOM");const je=I(De);M(me,je,null),e.$setSelection(null),me.dispatchCommand(e.SELECTION_CHANGE_COMMAND,void 0)})}enableHighlightStyle(){const me=this.editor;me.update(()=>{const _e=me.getElementByKey(this.tableNodeKey);if(!_e)throw new Error("Expected to find TableElement in DOM");t.removeClassNamesFromElement(_e,me._config.theme.tableSelection),_e.classList.remove("disable-selection"),this.hasHijackedSelectionStyles=!1})}disableHighlightStyle(){const me=this.editor;me.update(()=>{const _e=me.getElementByKey(this.tableNodeKey);if(!_e)throw new Error("Expected to find TableElement in DOM");t.addClassNamesToElement(_e,me._config.theme.tableSelection),this.hasHijackedSelectionStyles=!0})}updateTableGridSelection(me){if(me!=null&&me.gridKey===this.tableNodeKey){const _e=this.editor;this.gridSelection=me,this.isHighlightingCells=!0,this.disableHighlightStyle(),M(_e,this.grid,this.gridSelection)}else me==null?this.clearHighlight():(this.tableNodeKey=me.gridKey,this.updateTableGridSelection(me))}setFocusCellForSelection(me,_e=!1){const De=this.editor;De.update(()=>{const je=e.$getNodeByKey(this.tableNodeKey);if(!w(je))throw new Error("Expected TableNode.");if(!De.getElementByKey(this.tableNodeKey))throw new Error("Expected to find TableElement in DOM");const Me=me.x,We=me.y;if(this.focusCell=me,this.anchorCell!==null){const tt=C(De._window);tt&&tt.setBaseAndExtent(this.anchorCell.elem,0,this.focusCell.elem,0)}if(!this.isHighlightingCells&&(this.anchorX!==Me||this.anchorY!==We||_e))this.isHighlightingCells=!0,this.disableHighlightStyle();else if(Me===this.focusX&&We===this.focusY)return;if(this.focusX=Me,this.focusY=We,this.isHighlightingCells){const tt=e.$getNearestNodeFromDOMNode(me.elem);if(this.gridSelection!=null&&this.anchorCellNodeKey!=null&&l(tt)){const ht=tt.getKey();this.gridSelection=this.gridSelection.clone()||e.DEPRECATED_$createGridSelection(),this.focusCellNodeKey=ht,this.gridSelection.set(this.tableNodeKey,this.anchorCellNodeKey,this.focusCellNodeKey),e.$setSelection(this.gridSelection),De.dispatchCommand(e.SELECTION_CHANGE_COMMAND,void 0),M(De,this.grid,this.gridSelection)}}})}setAnchorCellForSelection(me){this.isHighlightingCells=!1,this.anchorCell=me,this.anchorX=me.x,this.anchorY=me.y,this.editor.update(()=>{const _e=e.$getNearestNodeFromDOMNode(me.elem);if(l(_e)){const De=_e.getKey();this.gridSelection=this.gridSelection!=null?this.gridSelection.clone():e.DEPRECATED_$createGridSelection(),this.anchorCellNodeKey=De}})}formatCells(me){this.editor.update(()=>{const _e=e.$getSelection();if(!e.DEPRECATED_$isGridSelection(_e))throw Error("Expected grid selection");const De=e.$createRangeSelection(),je=De.anchor,Me=De.focus;_e.getNodes().forEach(We=>{l(We)&&We.getTextContentSize()!==0&&(je.set(We.getKey(),0,"element"),Me.set(We.getKey(),We.getChildrenSize(),"element"),De.formatText(me))}),e.$setSelection(_e),this.editor.dispatchCommand(e.SELECTION_CHANGE_COMMAND,void 0)})}clearText(){const me=this.editor;me.update(()=>{const _e=e.$getNodeByKey(this.tableNodeKey);if(!w(_e))throw new Error("Expected TableNode.");const De=e.$getSelection();if(!e.DEPRECATED_$isGridSelection(De))throw Error("Expected grid selection");const je=De.getNodes().filter(l);if(je.length===this.grid.columns*this.grid.rows){_e.selectPrevious(),_e.remove(),e.$getRoot().selectStart();return}je.forEach(Me=>{if(e.$isElementNode(Me)){const We=e.$createParagraphNode(),tt=e.$createTextNode();We.append(tt),Me.append(We),Me.getChildren().forEach(ht=>{ht!==We&&ht.remove()})}}),M(me,this.grid,null),e.$setSelection(null),me.dispatchCommand(e.SELECTION_CHANGE_COMMAND,void 0)})}}const y="__lexicalTableSelection";function N(Ae,me,_e,De){const je=_e.getRootElement();if(je===null)throw new Error("No root element.");const Me=new b(_e,Ae.getKey()),We=_e._window||window;R(me,Me),me.addEventListener("mousedown",Xe=>{setTimeout(()=>{if(Xe.button!==0||!We)return;const qe=k(Xe.target);qe!==null&&(ie(Xe),Me.setAnchorCellForSelection(qe));const lt=()=>{We.removeEventListener("mouseup",lt),We.removeEventListener("mousemove",et)},et=ot=>{const ct=k(ot.target);ct!==null&&(Me.anchorX!==ct.x||Me.anchorY!==ct.y)&&(ot.preventDefault(),Me.setFocusCellForSelection(ct))};We.addEventListener("mouseup",lt),We.addEventListener("mousemove",et)},0)});const tt=Xe=>{Xe.button===0&&_e.update(()=>{const qe=e.$getSelection(),lt=Xe.target;e.DEPRECATED_$isGridSelection(qe)&&qe.gridKey===Me.tableNodeKey&&je.contains(lt)&&Me.clearHighlight()})};We.addEventListener("mousedown",tt),Me.listenersToRemove.add(()=>We.removeEventListener("mousedown",tt)),Me.listenersToRemove.add(_e.registerCommand(e.KEY_ARROW_DOWN_COMMAND,Xe=>q(_e,Xe,"down",Ae,Me),e.COMMAND_PRIORITY_HIGH)),Me.listenersToRemove.add(_e.registerCommand(e.KEY_ARROW_UP_COMMAND,Xe=>q(_e,Xe,"up",Ae,Me),e.COMMAND_PRIORITY_HIGH)),Me.listenersToRemove.add(_e.registerCommand(e.KEY_ARROW_LEFT_COMMAND,Xe=>q(_e,Xe,"backward",Ae,Me),e.COMMAND_PRIORITY_HIGH)),Me.listenersToRemove.add(_e.registerCommand(e.KEY_ARROW_RIGHT_COMMAND,Xe=>q(_e,Xe,"forward",Ae,Me),e.COMMAND_PRIORITY_HIGH)),Me.listenersToRemove.add(_e.registerCommand(e.KEY_ESCAPE_COMMAND,Xe=>{const qe=e.$getSelection();if(e.DEPRECATED_$isGridSelection(qe)){const lt=t.$findMatchingParent(qe.focus.getNode(),l);if(l(lt))return ie(Xe),lt.selectEnd(),!0}return!1},e.COMMAND_PRIORITY_HIGH));const ht=Xe=>()=>{const qe=e.$getSelection();if(!J(qe,Ae))return!1;if(e.DEPRECATED_$isGridSelection(qe))return Me.clearText(),!0;if(e.$isRangeSelection(qe)){const lt=t.$findMatchingParent(qe.anchor.getNode(),Yt=>l(Yt));if(!l(lt))return!1;const et=qe.anchor.getNode(),ot=qe.focus.getNode(),ct=Ae.isParentOf(et),pt=Ae.isParentOf(ot);if(ct&&!pt||pt&&!ct)return Me.clearText(),!0;const Ct=t.$findMatchingParent(qe.anchor.getNode(),Yt=>e.$isElementNode(Yt)),$t=Ct&&t.$findMatchingParent(Ct,Yt=>e.$isElementNode(Yt)&&l(Yt.getParent()));if(!e.$isElementNode($t)||!e.$isElementNode(Ct))return!1;if(Xe===e.DELETE_LINE_COMMAND&&$t.getPreviousSibling()===null)return!0;if((Xe===e.DELETE_CHARACTER_COMMAND||Xe===e.DELETE_WORD_COMMAND)&&qe.isCollapsed()&&qe.anchor.offset===0&&Ct!==$t){const Yt=Ct.getChildren(),Kt=e.$createParagraphNode();return Yt.forEach(qt=>Kt.append(qt)),Ct.replace(Kt),Ct.getWritable().__parent=lt.getKey(),!0}}return!1};[e.DELETE_WORD_COMMAND,e.DELETE_LINE_COMMAND,e.DELETE_CHARACTER_COMMAND].forEach(Xe=>{Me.listenersToRemove.add(_e.registerCommand(Xe,ht(Xe),e.COMMAND_PRIORITY_CRITICAL))});const Et=Xe=>{const qe=e.$getSelection();if(!J(qe,Ae))return!1;if(e.DEPRECATED_$isGridSelection(qe))return Xe.preventDefault(),Xe.stopPropagation(),Me.clearText(),!0;if(e.$isRangeSelection(qe)){const lt=t.$findMatchingParent(qe.anchor.getNode(),et=>l(et));if(!l(lt))return!1}return!1};Me.listenersToRemove.add(_e.registerCommand(e.KEY_BACKSPACE_COMMAND,Et,e.COMMAND_PRIORITY_CRITICAL)),Me.listenersToRemove.add(_e.registerCommand(e.KEY_DELETE_COMMAND,Et,e.COMMAND_PRIORITY_CRITICAL)),Me.listenersToRemove.add(_e.registerCommand(e.FORMAT_TEXT_COMMAND,Xe=>{const qe=e.$getSelection();if(!J(qe,Ae))return!1;if(e.DEPRECATED_$isGridSelection(qe))return Me.formatCells(Xe),!0;if(e.$isRangeSelection(qe)){const lt=t.$findMatchingParent(qe.anchor.getNode(),et=>l(et));if(!l(lt))return!1}return!1},e.COMMAND_PRIORITY_CRITICAL)),Me.listenersToRemove.add(_e.registerCommand(e.CONTROLLED_TEXT_INSERTION_COMMAND,Xe=>{const qe=e.$getSelection();if(!J(qe,Ae))return!1;if(e.DEPRECATED_$isGridSelection(qe))return Me.clearHighlight(),!1;if(e.$isRangeSelection(qe)){const lt=t.$findMatchingParent(qe.anchor.getNode(),et=>l(et));if(!l(lt))return!1}return!1},e.COMMAND_PRIORITY_CRITICAL)),De&&Me.listenersToRemove.add(_e.registerCommand(e.KEY_TAB_COMMAND,Xe=>{const qe=e.$getSelection();if(!e.$isRangeSelection(qe)||!qe.isCollapsed()||!J(qe,Ae))return!1;const lt=V(qe.anchor.getNode());if(lt===null)return!1;ie(Xe);const et=Ae.getCordsFromCellNode(lt,Me.grid);return Z(Me,Ae,et.x,et.y,Xe.shiftKey?"backward":"forward"),!0},e.COMMAND_PRIORITY_CRITICAL)),Me.listenersToRemove.add(_e.registerCommand(e.FOCUS_COMMAND,Xe=>Ae.isSelected(),e.COMMAND_PRIORITY_HIGH));function Lt(Xe){const qe=Ae.getCordsFromCellNode(Xe,Me.grid);return Ae.getCellFromCordsOrThrow(qe.x,qe.y,Me.grid)}return Me.listenersToRemove.add(_e.registerCommand(e.SELECTION_CHANGE_COMMAND,()=>{const Xe=e.$getSelection(),qe=e.$getPreviousSelection();if(e.$isRangeSelection(Xe)){const{anchor:lt,focus:et}=Xe,ot=lt.getNode(),ct=et.getNode(),pt=V(ot),Ct=V(ct),$t=pt&&Ae.is(B(pt)),Yt=Ct&&Ae.is(B(Ct)),Kt=$t!==Yt,qt=$t&&Yt,fn=Xe.isBackward();if(Kt){const dr=Xe.clone();dr.focus.set(Ae.getKey(),fn?0:Ae.getChildrenSize(),"element"),e.$setSelection(dr),ee(_e,Me)}else qt&&(pt.is(Ct)||(Me.setAnchorCellForSelection(Lt(pt)),Me.setFocusCellForSelection(Lt(Ct),!0)))}return Xe&&!Xe.is(qe)&&(e.DEPRECATED_$isGridSelection(Xe)||e.DEPRECATED_$isGridSelection(qe))&&Me.gridSelection&&!Me.gridSelection.is(qe)?(e.DEPRECATED_$isGridSelection(Xe)&&Xe.gridKey===Me.tableNodeKey?Me.updateTableGridSelection(Xe):!e.DEPRECATED_$isGridSelection(Xe)&&e.DEPRECATED_$isGridSelection(qe)&&qe.gridKey===Me.tableNodeKey&&Me.updateTableGridSelection(null),!1):(Me.hasHijackedSelectionStyles&&!Ae.isSelected()?re(_e,Me):!Me.hasHijackedSelectionStyles&&Ae.isSelected()&&ee(_e,Me),!1)},e.COMMAND_PRIORITY_CRITICAL)),Me}function R(Ae,me){Ae[y]=me}function O(Ae){return Ae[y]}function k(Ae){let me=Ae;for(;me!=null;){const _e=me.nodeName;if(_e==="TD"||_e==="TH"){const De=me._cell;return De===void 0?null:De}me=me.parentNode}return null}function I(Ae){const me=[],_e={cells:me,columns:0,rows:0};let De=Ae.firstChild,je=0,Me=0;for(me.length=0;De!=null;){const We=De.nodeName;if(We==="TD"||We==="TH"){const Et=De,Lt={elem:Et,hasBackgroundColor:Et.style.backgroundColor!=="",highlighted:!1,x:je,y:Me};De._cell=Lt;let Xe=me[Me];Xe===void 0&&(Xe=me[Me]=[]),Xe[je]=Lt}else{const Et=De.firstChild;if(Et!=null){De=Et;continue}}const tt=De.nextSibling;if(tt!=null){je++,De=tt;continue}const ht=De.parentNode;if(ht!=null){const Et=ht.nextSibling;if(Et==null)break;Me++,je=0,De=Et}}return _e.columns=je+1,_e.rows=Me+1,_e}function M(Ae,me,_e){const De=new Set(_e?_e.getNodes():[]);Y(me,(je,Me)=>{const We=je.elem;De.has(Me)?(je.highlighted=!0,te(Ae,je)):(je.highlighted=!1,he(Ae,je),We.getAttribute("style")||We.removeAttribute("style"))})}function Y(Ae,me){const{cells:_e}=Ae;for(let De=0;De<_e.length;De++){const je=_e[De];if(je)for(let Me=0;Me<je.length;Me++){const We=je[Me];if(!We)continue;const tt=e.$getNearestNodeFromDOMNode(We.elem);tt!==null&&me(We,tt,{x:Me,y:De})}}}function ee(Ae,me){me.disableHighlightStyle(),Y(me.grid,_e=>{_e.highlighted=!0,te(Ae,_e)})}function re(Ae,me){me.enableHighlightStyle(),Y(me.grid,_e=>{const De=_e.elem;_e.highlighted=!1,he(Ae,_e),De.getAttribute("style")||De.removeAttribute("style")})}const Z=(Ae,me,_e,De,je)=>{const Me=je==="forward";switch(je){case"backward":case"forward":return _e!==(Me?Ae.grid.columns-1:0)?fe(me.getCellNodeFromCordsOrThrow(_e+(Me?1:-1),De,Ae.grid),Me):De!==(Me?Ae.grid.rows-1:0)?fe(me.getCellNodeFromCordsOrThrow(Me?0:Ae.grid.columns-1,De+(Me?1:-1),Ae.grid),Me):Me?me.selectNext():me.selectPrevious(),!0;case"up":return De!==0?fe(me.getCellNodeFromCordsOrThrow(_e,De-1,Ae.grid),!1):me.selectPrevious(),!0;case"down":return De!==Ae.grid.rows-1?fe(me.getCellNodeFromCordsOrThrow(_e,De+1,Ae.grid),!0):me.selectNext(),!0;default:return!1}},U=(Ae,me,_e,De,je)=>{const Me=je==="forward";switch(je){case"backward":case"forward":return _e!==(Me?Ae.grid.columns-1:0)&&Ae.setFocusCellForSelection(me.getCellFromCordsOrThrow(_e+(Me?1:-1),De,Ae.grid)),!0;case"up":return De!==0?(Ae.setFocusCellForSelection(me.getCellFromCordsOrThrow(_e,De-1,Ae.grid)),!0):!1;case"down":return De!==Ae.grid.rows-1?(Ae.setFocusCellForSelection(me.getCellFromCordsOrThrow(_e,De+1,Ae.grid)),!0):!1;default:return!1}};function J(Ae,me){if(e.$isRangeSelection(Ae)||e.DEPRECATED_$isGridSelection(Ae)){const _e=me.isParentOf(Ae.anchor.getNode()),De=me.isParentOf(Ae.focus.getNode());return _e&&De}return!1}function fe(Ae,me){me?Ae.selectStart():Ae.selectEnd()}const ge="172,206,247";function te(Ae,me){const _e=me.elem,De=e.$getNearestNodeFromDOMNode(_e);if(!l(De))throw Error("Expected to find LexicalNode from Table Cell DOMNode");De.getBackgroundColor()===null?_e.style.setProperty("background-color",`rgb(${ge})`):_e.style.setProperty("background-image",`linear-gradient(to right, rgba(${ge},0.85), rgba(${ge},0.85))`),_e.style.setProperty("caret-color","transparent")}function he(Ae,me){const _e=me.elem,De=e.$getNearestNodeFromDOMNode(_e);if(!l(De))throw Error("Expected to find LexicalNode from Table Cell DOMNode");De.getBackgroundColor()===null&&_e.style.removeProperty("background-color"),_e.style.removeProperty("background-image"),_e.style.removeProperty("caret-color")}function V(Ae){const me=t.$findMatchingParent(Ae,l);return l(me)?me:null}function B(Ae){const me=t.$findMatchingParent(Ae,w);return w(me)?me:null}function q(Ae,me,_e,De,je){const Me=e.$getSelection();if(!J(Me,De))return!1;if(e.$isRangeSelection(Me)&&Me.isCollapsed()){if(_e==="backward"||_e==="forward")return!1;const{anchor:We,focus:tt}=Me,ht=t.$findMatchingParent(We.getNode(),l),Et=t.$findMatchingParent(tt.getNode(),l);if(!l(ht)||!ht.is(Et))return!1;const Lt=B(ht);if(Lt!==De&&Lt!=null){const pt=Ae.getElementByKey(Lt.getKey());if(pt!=null)return je.grid=I(pt),q(Ae,me,_e,Lt,je)}const Xe=Ae.getElementByKey(ht.__key),qe=Ae.getElementByKey(We.key);if(qe==null||Xe==null)return!1;let lt;if(We.type==="element")lt=qe.getBoundingClientRect();else{const pt=window.getSelection();if(pt===null||pt.rangeCount===0)return!1;lt=pt.getRangeAt(0).getBoundingClientRect()}const et=_e==="up"?ht.getFirstChild():ht.getLastChild();if(et==null)return!1;const ot=Ae.getElementByKey(et.__key);if(ot==null)return!1;const ct=ot.getBoundingClientRect();if(_e==="up"?ct.top>lt.top-lt.height:lt.bottom+lt.height>ct.bottom){ie(me);const pt=De.getCordsFromCellNode(ht,je.grid);if(me.shiftKey){const Ct=De.getCellFromCordsOrThrow(pt.x,pt.y,je.grid);je.setAnchorCellForSelection(Ct),je.setFocusCellForSelection(Ct,!0)}else return Z(je,De,pt.x,pt.y,_e);return!0}}else if(e.DEPRECATED_$isGridSelection(Me)){const{anchor:We,focus:tt}=Me,ht=t.$findMatchingParent(We.getNode(),l),Et=t.$findMatchingParent(tt.getNode(),l),[Lt]=Me.getNodes(),Xe=Ae.getElementByKey(Lt.getKey());if(!l(ht)||!l(Et)||!w(Lt)||Xe==null)return!1;je.updateTableGridSelection(Me);const qe=I(Xe),lt=De.getCordsFromCellNode(ht,qe),et=De.getCellFromCordsOrThrow(lt.x,lt.y,qe);if(je.setAnchorCellForSelection(et),ie(me),me.shiftKey){const ot=De.getCordsFromCellNode(Et,qe);return U(je,Lt,ot.x,ot.y,_e)}else Et.selectEnd();return!0}return!1}function ie(Ae){Ae.preventDefault(),Ae.stopImmediatePropagation(),Ae.stopPropagation()}class H extends e.DEPRECATED_GridNode{static getType(){return"table"}static clone(me){return new H(me.__key)}static importDOM(){return{table:me=>({conversion:Q,priority:1})}}static importJSON(me){return F()}constructor(me){super(me)}exportJSON(){return{...super.exportJSON(),type:"table",version:1}}createDOM(me,_e){const De=document.createElement("table");return t.addClassNamesToElement(De,me.theme.table),De}updateDOM(){return!1}exportDOM(me){return{...super.exportDOM(me),after:_e=>{if(_e){const De=_e.cloneNode(),je=document.createElement("colgroup"),Me=document.createElement("tbody");t.isHTMLElement(_e)&&Me.append(..._e.children);const We=this.getFirstChildOrThrow();if(!_(We))throw new Error("Expected to find row node.");const tt=We.getChildrenSize();for(let ht=0;ht<tt;ht++){const Et=document.createElement("col");je.append(Et)}return De.replaceChildren(je,Me),De}}}}canExtractContents(){return!1}canBeEmpty(){return!1}isShadowRoot(){return!0}getCordsFromCellNode(me,_e){const{rows:De,cells:je}=_e;for(let Me=0;Me<De;Me++){const We=je[Me];if(We==null)continue;const tt=We.findIndex(ht=>{if(!ht)return;const{elem:Et}=ht;return e.$getNearestNodeFromDOMNode(Et)===me});if(tt!==-1)return{x:tt,y:Me}}throw new Error("Cell not found in table.")}getCellFromCords(me,_e,De){const{cells:je}=De,Me=je[_e];return Me==null?null:Me[me]??null}getCellFromCordsOrThrow(me,_e,De){const je=this.getCellFromCords(me,_e,De);if(!je)throw new Error("Cell not found at cords.");return je}getCellNodeFromCords(me,_e,De){const je=this.getCellFromCords(me,_e,De);if(je==null)return null;const Me=e.$getNearestNodeFromDOMNode(je.elem);return l(Me)?Me:null}getCellNodeFromCordsOrThrow(me,_e,De){const je=this.getCellNodeFromCords(me,_e,De);if(!je)throw new Error("Node at cords not TableCellNode.");return je}canSelectBefore(){return!0}canIndent(){return!1}}function j(Ae,me){const _e=Ae.getElementByKey(me.getKey());if(_e==null)throw new Error("Table Element Not Found");return I(_e)}function Q(Ae){return{node:F()}}function F(){return e.$applyNodeReplacement(new H)}function w(Ae){return Ae instanceof H}function T(Ae,me,_e=!0){const De=F();for(let je=0;je<Ae;je++){const Me=m();for(let We=0;We<me;We++){let tt=r.NO_STATUS;typeof _e=="object"?(je===0&&_e.rows&&(tt|=r.ROW),We===0&&_e.columns&&(tt|=r.COLUMN)):_e&&(je===0&&(tt|=r.ROW),We===0&&(tt|=r.COLUMN));const ht=a(tt),Et=e.$createParagraphNode();Et.append(e.$createTextNode()),ht.append(Et),Me.append(ht)}De.append(Me)}return De}function P(Ae){const me=t.$findMatchingParent(Ae,_e=>l(_e));return l(me)?me:null}function X(Ae){const me=t.$findMatchingParent(Ae,_e=>_(_e));if(_(me))return me;throw new Error("Expected table cell to be inside of table row.")}function ue(Ae){const me=t.$findMatchingParent(Ae,_e=>w(_e));if(w(me))return me;throw new Error("Expected table cell to be inside of table.")}function pe(Ae){const me=X(Ae);return ue(me).getChildren().findIndex(_e=>_e.is(me))}function se(Ae){return X(Ae).getChildren().findIndex(me=>me.is(Ae))}function Ce(Ae,me){const _e=ue(Ae),{x:De,y:je}=_e.getCordsFromCellNode(Ae,me);return{above:_e.getCellNodeFromCords(De,je-1,me),below:_e.getCellNodeFromCords(De,je+1,me),left:_e.getCellNodeFromCords(De-1,je,me),right:_e.getCellNodeFromCords(De+1,je,me)}}function Se(Ae,me){const _e=Ae.getChildren();if(me>=_e.length||me<0)throw new Error("Expected table cell to be inside of table row.");return _e[me].remove(),Ae}function He(Ae,me,_e=!0,De,je){const Me=Ae.getChildren();if(me>=Me.length||me<0)throw new Error("Table row target index out of range");const We=Me[me];if(_(We))for(let tt=0;tt<De;tt++){const ht=We.getChildren(),Et=ht.length,Lt=m();for(let Xe=0;Xe<Et;Xe++){const qe=ht[Xe];if(!l(qe))throw Error("Expected table cell");const{above:lt,below:et}=Ce(qe,je);let ot=r.NO_STATUS;const ct=lt&<.getWidth()||et&&et.getWidth()||void 0;(lt&<.hasHeaderState(r.COLUMN)||et&&et.hasHeaderState(r.COLUMN))&&(ot|=r.COLUMN);const pt=a(ot,1,ct);pt.append(e.$createParagraphNode()),Lt.append(pt)}_e?We.insertAfter(Lt):We.insertBefore(Lt)}else throw new Error("Row before insertion index does not exist.");return Ae}function le(Ae=!0){const me=e.$getSelection();if(!e.$INTERNAL_isPointSelection(me))throw Error("Expected a INTERNAL_PointSelection");const _e=me.focus.getNode(),[De,,je]=e.DEPRECATED_$getNodeTriplet(_e),[Me,We]=e.DEPRECATED_$computeGridMap(je,De,De),tt=Me[0].length,{startRow:ht}=We;if(Ae){const Et=ht+De.__rowSpan-1,Lt=Me[Et],Xe=m();for(let lt=0;lt<tt;lt++){const{cell:et,startRow:ot}=Lt[lt];ot+et.__rowSpan-1<=Et?Xe.append(a(r.NO_STATUS)):et.setRowSpan(et.__rowSpan+1)}const qe=je.getChildAtIndex(Et);if(!e.DEPRECATED_$isGridRowNode(qe))throw Error("focusEndRow is not a GridRowNode");qe.insertAfter(Xe)}else{const Et=Me[ht],Lt=m();for(let qe=0;qe<tt;qe++){const{cell:lt,startRow:et}=Et[qe];et===ht?Lt.append(a(r.NO_STATUS)):lt.setRowSpan(lt.__rowSpan+1)}const Xe=je.getChildAtIndex(ht);if(!e.DEPRECATED_$isGridRowNode(Xe))throw Error("focusEndRow is not a GridRowNode");Xe.insertBefore(Lt)}}function ce(Ae,me,_e=!0,De,je){const Me=Ae.getChildren(),We=[];for(let tt=0;tt<Me.length;tt++){const ht=Me[tt];if(_(ht))for(let Et=0;Et<De;Et++){const Lt=ht.getChildren();if(me>=Lt.length||me<0)throw new Error("Table column target index out of range");const Xe=Lt[me];if(!l(Xe))throw Error("Expected table cell");const{left:qe,right:lt}=Ce(Xe,je);let et=r.NO_STATUS;(qe&&qe.hasHeaderState(r.ROW)||lt&<.hasHeaderState(r.ROW))&&(et|=r.ROW);const ot=a(et);ot.append(e.$createParagraphNode()),We.push({newTableCell:ot,targetCell:Xe})}}return We.forEach(({newTableCell:tt,targetCell:ht})=>{_e?ht.insertAfter(tt):ht.insertBefore(tt)}),Ae}function ve(Ae=!0){const me=e.$getSelection();if(!e.$INTERNAL_isPointSelection(me))throw Error("Expected a PointSeleciton");const _e=me.anchor.getNode(),De=me.focus.getNode(),[je]=e.DEPRECATED_$getNodeTriplet(_e),[Me,,We]=e.DEPRECATED_$getNodeTriplet(De),[tt,ht,Et]=e.DEPRECATED_$computeGridMap(We,Me,je),Lt=tt.length,Xe=Ae?Math.max(ht.startColumn,Et.startColumn):Math.min(ht.startColumn,Et.startColumn),qe=Ae?Xe+Me.__colSpan-1:Xe-1,lt=We.getFirstChild();if(!e.DEPRECATED_$isGridRowNode(lt))throw Error("Expected firstTable child to be a row");let et=null;function ot(){const pt=a(r.NO_STATUS).append(e.$createParagraphNode());return et===null&&(et=pt),pt}let ct=lt;e:for(let pt=0;pt<Lt;pt++){if(pt!==0){const qt=ct.getNextSibling();if(!e.DEPRECATED_$isGridRowNode(qt))throw Error("Expected row nextSibling to be a row");ct=qt}const Ct=tt[pt];if(qe<0){st(ct,ot());continue}const{cell:$t,startColumn:Yt,startRow:Kt}=Ct[qe];if(Yt+$t.__colSpan-1<=qe){let qt=$t,fn=Kt,dr=qe;for(;fn!==pt&&qt.__rowSpan>1;)if(dr-=$t.__colSpan,dr>=0){const{cell:Cr,startRow:Zo}=Ct[dr];qt=Cr,fn=Zo}else{ct.append(ot());continue e}qt.insertAfter(ot())}else $t.setColSpan($t.__colSpan+1)}et!==null&&Qe(et)}function ke(Ae,me){const _e=Ae.getChildren();for(let De=0;De<_e.length;De++){const je=_e[De];if(_(je)){const Me=je.getChildren();if(me>=Me.length||me<0)throw new Error("Table column target index out of range");Me[me].remove()}}return Ae}function Pe(){const Ae=e.$getSelection();if(!e.$INTERNAL_isPointSelection(Ae))throw Error("Expected a INTERNAL_PointSelection");const me=Ae.anchor.getNode(),_e=Ae.focus.getNode(),[De,,je]=e.DEPRECATED_$getNodeTriplet(me),[Me]=e.DEPRECATED_$getNodeTriplet(_e),[We,tt,ht]=e.DEPRECATED_$computeGridMap(je,De,Me),{startRow:Et}=tt,{startRow:Lt}=ht,Xe=Lt+Me.__rowSpan-1;if(We.length===Xe-Et+1){je.remove();return}const qe=We[0].length,lt=We[Xe+1],et=je.getChildAtIndex(Xe+1);for(let ot=Xe;ot>=Et;ot--){for(let pt=qe-1;pt>=0;pt--){const{cell:Ct,startRow:$t,startColumn:Yt}=We[ot][pt];if(Yt===pt&&(ot===Et&&$t<Et&&Ct.setRowSpan(Ct.__rowSpan-($t-Et)),$t>=Et&&$t+Ct.__rowSpan-1>Xe)){if(Ct.setRowSpan(Ct.__rowSpan-(Xe-$t+1)),et===null)throw Error("Expected nextRowNode not to be null");if(pt===0)st(et,Ct);else{const{cell:Kt}=lt[pt-1];Kt.insertAfter(Ct)}}}const ct=je.getChildAtIndex(ot);if(!e.DEPRECATED_$isGridRowNode(ct))throw Error(`Expected GridNode childAtIndex(${String(ot)}) to be RowNode`);ct.remove()}if(lt!==void 0){const{cell:ot}=lt[0];Qe(ot)}else{const ot=We[Et-1],{cell:ct}=ot[0];Qe(ct)}}function Fe(){const Ae=e.$getSelection();if(!e.$INTERNAL_isPointSelection(Ae))throw Error("Expected a INTERNAL_PointSelection");const me=Ae.anchor.getNode(),_e=Ae.focus.getNode(),[De,,je]=e.DEPRECATED_$getNodeTriplet(me),[Me]=e.DEPRECATED_$getNodeTriplet(_e),[We,tt,ht]=e.DEPRECATED_$computeGridMap(je,De,Me),{startColumn:Et}=tt,{startRow:Lt,startColumn:Xe}=ht,qe=Math.min(Et,Xe),lt=Math.max(Et+De.__colSpan-1,Xe+Me.__colSpan-1),et=lt-qe+1;if(We[0].length===lt-qe+1){je.selectPrevious(),je.remove();return}const ot=We.length;for(let Ct=0;Ct<ot;Ct++)for(let $t=qe;$t<=lt;$t++){const{cell:Yt,startColumn:Kt}=We[Ct][$t];if(Kt<qe){if($t===qe){const qt=qe-Kt;Yt.setColSpan(Yt.__colSpan-Math.min(et,Yt.__colSpan-qt))}}else if(Kt+Yt.__colSpan-1>lt){if($t===lt){const qt=lt-Kt+1;Yt.setColSpan(Yt.__colSpan-qt)}}else Yt.remove()}const ct=We[Lt],pt=ct[Xe+Me.__colSpan];if(pt!==void 0){const{cell:Ct}=pt;Qe(Ct)}else{const Ct=ct[Xe-1],{cell:$t}=Ct;Qe($t)}}function Qe(Ae){const me=Ae.getFirstDescendant();me==null?Ae.selectStart():me.getParentOrThrow().selectStart()}function st(Ae,me){const _e=Ae.getFirstChild();_e!==null?_e.insertBefore(me):Ae.append(me)}function dt(){const Ae=e.$getSelection();if(!e.$INTERNAL_isPointSelection(Ae))throw Error("Expected a INTERNAL_PointSelection");const me=Ae.anchor.getNode(),[_e,De,je]=e.DEPRECATED_$getNodeTriplet(me),Me=_e.__colSpan,We=_e.__rowSpan;if(Me>1){for(let tt=1;tt<Me;tt++)_e.insertAfter(a(r.NO_STATUS));_e.setColSpan(1)}if(We>1){const[tt,ht]=e.DEPRECATED_$computeGridMap(je,_e,_e),{startColumn:Et,startRow:Lt}=ht;let Xe;for(let qe=1;qe<We;qe++){const lt=Lt+qe,et=tt[lt];if(Xe=(Xe||De).getNextSibling(),!e.DEPRECATED_$isGridRowNode(Xe))throw Error("Expected row next sibling to be a row");let ot=null;for(let ct=0;ct<Et;ct++){const pt=et[ct],Ct=pt.cell;pt.startRow===lt&&(ot=Ct),Ct.__colSpan>1&&(ct+=Ct.__colSpan-1)}if(ot===null)for(let ct=0;ct<Me;ct++)st(Xe,a(r.NO_STATUS));else for(let ct=0;ct<Me;ct++)ot.insertAfter(a(r.NO_STATUS))}_e.setRowSpan(1)}}const At=e.createCommand("INSERT_TABLE_COMMAND");return tn.$createTableCellNode=a,tn.$createTableNode=F,tn.$createTableNodeWithDimensions=T,tn.$createTableRowNode=m,tn.$deleteTableColumn=ke,tn.$deleteTableColumn__EXPERIMENTAL=Fe,tn.$deleteTableRow__EXPERIMENTAL=Pe,tn.$getElementGridForTableNode=j,tn.$getTableCellNodeFromLexicalNode=P,tn.$getTableColumnIndexFromTableCellNode=se,tn.$getTableNodeFromLexicalNodeOrThrow=ue,tn.$getTableRowIndexFromTableCellNode=pe,tn.$getTableRowNodeFromTableCellNodeOrThrow=X,tn.$insertTableColumn=ce,tn.$insertTableColumn__EXPERIMENTAL=ve,tn.$insertTableRow=He,tn.$insertTableRow__EXPERIMENTAL=le,tn.$isTableCellNode=l,tn.$isTableNode=w,tn.$isTableRowNode=_,tn.$removeTableRowAtIndex=Se,tn.$unmergeCell=dt,tn.INSERT_TABLE_COMMAND=At,tn.TableCellHeaderStates=r,tn.TableCellNode=o,tn.TableNode=H,tn.TableRowNode=u,tn.TableSelection=b,tn.applyTableHandlers=N,tn.getCellFromTarget=k,tn.getTableSelectionFromTableElement=O,tn}var nn={},r0;function lA(){if(r0)return nn;r0=1;var e=Xt(),t=vn();let n=/^(\d+(?:\.\d+)?)px$/,r={BOTH:3,COLUMN:2,NO_STATUS:0,ROW:1};class o extends e.DEPRECATED_GridCellNode{static getType(){return"tablecell"}static clone(T){let P=new o(T.__headerState,T.__colSpan,T.__width,T.__key);return P.__rowSpan=T.__rowSpan,P.__backgroundColor=T.__backgroundColor,P}static importDOM(){return{td:()=>({conversion:i,priority:0}),th:()=>({conversion:i,priority:0})}}static importJSON(T){let P=T.rowSpan||1,X=a(T.headerState,T.colSpan||1,T.width||void 0);return X.__rowSpan=P,X.__backgroundColor=T.backgroundColor||null,X}constructor(T=r.NO_STATUS,P=1,X,ue){super(P,ue),this.__headerState=T,this.__width=X,this.__backgroundColor=null}createDOM(T){let P=document.createElement(this.getTag());return this.__width&&(P.style.width=`${this.__width}px`),1<this.__colSpan&&(P.colSpan=this.__colSpan),1<this.__rowSpan&&(P.rowSpan=this.__rowSpan),this.__backgroundColor!==null&&(P.style.backgroundColor=this.__backgroundColor),t.addClassNamesToElement(P,T.theme.tableCell,this.hasHeader()&&T.theme.tableCellHeader),P}exportDOM(T){if({element:T}=super.exportDOM(T),T){var P=this.getParentOrThrow().getChildrenSize();T.style.border="1px solid black",1<this.__colSpan&&(T.colSpan=this.__colSpan),1<this.__rowSpan&&(T.rowSpan=this.__rowSpan),T.style.width=`${this.getWidth()||Math.max(90,700/P)}px`,T.style.verticalAlign="top",T.style.textAlign="start",P=this.getBackgroundColor(),P!==null?T.style.backgroundColor=P:this.hasHeader()&&(T.style.backgroundColor="#f2f3f5")}return{element:T}}exportJSON(){return{...super.exportJSON(),backgroundColor:this.getBackgroundColor(),headerState:this.__headerState,type:"tablecell",width:this.getWidth()}}getTag(){return this.hasHeader()?"th":"td"}setHeaderStyles(T){return this.getWritable().__headerState=T,this.__headerState}getHeaderStyles(){return this.getLatest().__headerState}setWidth(T){return this.getWritable().__width=T,this.__width}getWidth(){return this.getLatest().__width}getBackgroundColor(){return this.getLatest().__backgroundColor}setBackgroundColor(T){this.getWritable().__backgroundColor=T}toggleHeaderStyle(T){let P=this.getWritable();return P.__headerState=(P.__headerState&T)===T?P.__headerState-T:P.__headerState+T,P}hasHeaderState(T){return(this.getHeaderStyles()&T)===T}hasHeader(){return this.getLatest().__headerState!==r.NO_STATUS}updateDOM(T){return T.__headerState!==this.__headerState||T.__width!==this.__width||T.__colSpan!==this.__colSpan||T.__rowSpan!==this.__rowSpan||T.__backgroundColor!==this.__backgroundColor}isShadowRoot(){return!0}collapseAtStart(){return!0}canBeEmpty(){return!1}canIndent(){return!1}}function i(w){var T=w.nodeName.toLowerCase();let P;return n.test(w.style.width)&&(P=parseFloat(w.style.width)),T=a(T==="th"?r.ROW:r.NO_STATUS,w.colSpan,P),T.__rowSpan=w.rowSpan,w=w.style.backgroundColor,w!==""&&(T.__backgroundColor=w),{forChild:(X,ue)=>l(ue)&&!e.$isElementNode(X)?(ue=e.$createParagraphNode(),e.$isLineBreakNode(X)&&X.getTextContent()===`
|
|
102
|
-
`?null:(ue.append(X),ue)):X,node:T}}function a(w,T=1,P){return e.$applyNodeReplacement(new o(w,T,P))}function l(w){return w instanceof o}class u extends e.DEPRECATED_GridRowNode{static getType(){return"tablerow"}static clone(T){return new u(T.__height,T.__key)}static importDOM(){return{tr:()=>({conversion:p,priority:0})}}static importJSON(T){return m(T.height)}constructor(T,P){super(P),this.__height=T}exportJSON(){return{...super.exportJSON(),type:"tablerow",version:1}}createDOM(T){let P=document.createElement("tr");return this.__height&&(P.style.height=`${this.__height}px`),t.addClassNamesToElement(P,T.theme.tableRow),P}isShadowRoot(){return!0}setHeight(T){return this.getWritable().__height=T,this.__height}getHeight(){return this.getLatest().__height}updateDOM(T){return T.__height!==this.__height}canBeEmpty(){return!1}canIndent(){return!1}}function p(w){let T;return n.test(w.style.height)&&(T=parseFloat(w.style.height)),{node:m(T)}}function m(w){return e.$applyNodeReplacement(new u(w))}function _(w){return w instanceof u}function v(w){let T=new URLSearchParams;T.append("code",w);for(let P=1;P<arguments.length;P++)T.append("v",arguments[P]);throw Error(`Minified Lexical error #${w}; visit https://lexical.dev/docs/error?${T} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}let C=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";class b{constructor(T,P){this.isHighlightingCells=!1,this.focusY=this.focusX=this.anchorY=this.anchorX=-1,this.listenersToRemove=new Set,this.tableNodeKey=P,this.editor=T,this.grid={cells:[],columns:0,rows:0},this.focusCell=this.anchorCell=this.focusCellNodeKey=this.anchorCellNodeKey=this.gridSelection=null,this.hasHijackedSelectionStyles=!1,this.trackTableGrid()}getGrid(){return this.grid}removeListeners(){Array.from(this.listenersToRemove).forEach(T=>T())}trackTableGrid(){let T=new MutationObserver(P=>{this.editor.update(()=>{var X=!1;for(let ue=0;ue<P.length;ue++){const pe=P[ue].target.nodeName;if(pe==="TABLE"||pe==="TR"){X=!0;break}}if(X){if(X=this.editor.getElementByKey(this.tableNodeKey),!X)throw Error("Expected to find TableElement in DOM");this.grid=N(X)}})});this.editor.update(()=>{let P=this.editor.getElementByKey(this.tableNodeKey);if(!P)throw Error("Expected to find TableElement in DOM");this.grid=N(P),T.observe(P,{childList:!0,subtree:!0})})}clearHighlight(){let T=this.editor;this.isHighlightingCells=!1,this.focusY=this.focusX=this.anchorY=this.anchorX=-1,this.focusCell=this.anchorCell=this.focusCellNodeKey=this.anchorCellNodeKey=this.gridSelection=null,this.hasHijackedSelectionStyles=!1,this.enableHighlightStyle(),T.update(()=>{var P=e.$getNodeByKey(this.tableNodeKey);if(!B(P))throw Error("Expected TableNode.");if(P=T.getElementByKey(this.tableNodeKey),!P)throw Error("Expected to find TableElement in DOM");P=N(P),R(T,P,null),e.$setSelection(null),T.dispatchCommand(e.SELECTION_CHANGE_COMMAND,void 0)})}enableHighlightStyle(){let T=this.editor;T.update(()=>{let P=T.getElementByKey(this.tableNodeKey);if(!P)throw Error("Expected to find TableElement in DOM");t.removeClassNamesFromElement(P,T._config.theme.tableSelection),P.classList.remove("disable-selection"),this.hasHijackedSelectionStyles=!1})}disableHighlightStyle(){let T=this.editor;T.update(()=>{let P=T.getElementByKey(this.tableNodeKey);if(!P)throw Error("Expected to find TableElement in DOM");t.addClassNamesToElement(P,T._config.theme.tableSelection),this.hasHijackedSelectionStyles=!0})}updateTableGridSelection(T){if(T!=null&&T.gridKey===this.tableNodeKey){let P=this.editor;this.gridSelection=T,this.isHighlightingCells=!0,this.disableHighlightStyle(),R(P,this.grid,this.gridSelection)}else T==null?this.clearHighlight():(this.tableNodeKey=T.gridKey,this.updateTableGridSelection(T))}setFocusCellForSelection(T,P=!1){let X=this.editor;X.update(()=>{var ue=e.$getNodeByKey(this.tableNodeKey);if(!B(ue))throw Error("Expected TableNode.");if(!X.getElementByKey(this.tableNodeKey))throw Error("Expected to find TableElement in DOM");ue=T.x;let pe=T.y;if(this.focusCell=T,this.anchorCell!==null){let se=C?(X._window||window).getSelection():null;se&&se.setBaseAndExtent(this.anchorCell.elem,0,this.focusCell.elem,0)}if(!this.isHighlightingCells&&(this.anchorX!==ue||this.anchorY!==pe||P))this.isHighlightingCells=!0,this.disableHighlightStyle();else if(ue===this.focusX&&pe===this.focusY)return;this.focusX=ue,this.focusY=pe,this.isHighlightingCells&&(ue=e.$getNearestNodeFromDOMNode(T.elem),this.gridSelection!=null&&this.anchorCellNodeKey!=null&&l(ue)&&(ue=ue.getKey(),this.gridSelection=this.gridSelection.clone()||e.DEPRECATED_$createGridSelection(),this.focusCellNodeKey=ue,this.gridSelection.set(this.tableNodeKey,this.anchorCellNodeKey,this.focusCellNodeKey),e.$setSelection(this.gridSelection),X.dispatchCommand(e.SELECTION_CHANGE_COMMAND,void 0),R(X,this.grid,this.gridSelection)))})}setAnchorCellForSelection(T){this.isHighlightingCells=!1,this.anchorCell=T,this.anchorX=T.x,this.anchorY=T.y,this.editor.update(()=>{var P=e.$getNearestNodeFromDOMNode(T.elem);l(P)&&(P=P.getKey(),this.gridSelection=this.gridSelection!=null?this.gridSelection.clone():e.DEPRECATED_$createGridSelection(),this.anchorCellNodeKey=P)})}formatCells(T){this.editor.update(()=>{let P=e.$getSelection();e.DEPRECATED_$isGridSelection(P)||v(11);let X=e.$createRangeSelection(),ue=X.anchor,pe=X.focus;P.getNodes().forEach(se=>{l(se)&&se.getTextContentSize()!==0&&(ue.set(se.getKey(),0,"element"),pe.set(se.getKey(),se.getChildrenSize(),"element"),X.formatText(T))}),e.$setSelection(P),this.editor.dispatchCommand(e.SELECTION_CHANGE_COMMAND,void 0)})}clearText(){let T=this.editor;T.update(()=>{let P=e.$getNodeByKey(this.tableNodeKey);if(!B(P))throw Error("Expected TableNode.");var X=e.$getSelection();e.DEPRECATED_$isGridSelection(X)||v(11),X=X.getNodes().filter(l),X.length===this.grid.columns*this.grid.rows?(P.selectPrevious(),P.remove(),e.$getRoot().selectStart()):(X.forEach(ue=>{if(e.$isElementNode(ue)){let pe=e.$createParagraphNode(),se=e.$createTextNode();pe.append(se),ue.append(pe),ue.getChildren().forEach(Ce=>{Ce!==pe&&Ce.remove()})}}),R(T,this.grid,null),e.$setSelection(null),T.dispatchCommand(e.SELECTION_CHANGE_COMMAND,void 0))})}}function y(w){for(;w!=null;){let T=w.nodeName;if(T==="TD"||T==="TH"){if(w=w._cell,w===void 0)break;return w}w=w.parentNode}return null}function N(w){let T=[],P={cells:T,columns:0,rows:0};var X=w.firstChild;let ue=w=0;for(T.length=0;X!=null;){var pe=X.nodeName;if(pe==="TD"||pe==="TH"){pe=X,pe={elem:pe,hasBackgroundColor:pe.style.backgroundColor!=="",highlighted:!1,x:w,y:ue},X._cell=pe;let se=T[ue];se===void 0&&(se=T[ue]=[]),se[w]=pe}else if(pe=X.firstChild,pe!=null){X=pe;continue}if(pe=X.nextSibling,pe!=null)w++,X=pe;else if(pe=X.parentNode,pe!=null){if(X=pe.nextSibling,X==null)break;ue++,w=0}}return P.columns=w+1,P.rows=ue+1,P}function R(w,T,P){let X=new Set(P?P.getNodes():[]);O(T,(ue,pe)=>{let se=ue.elem;X.has(pe)?(ue.highlighted=!0,re(w,ue)):(ue.highlighted=!1,Z(w,ue),se.getAttribute("style")||se.removeAttribute("style"))})}function O(w,T){({cells:w}=w);for(let P=0;P<w.length;P++){let X=w[P];if(X)for(let ue=0;ue<X.length;ue++){let pe=X[ue];if(!pe)continue;let se=e.$getNearestNodeFromDOMNode(pe.elem);se!==null&&T(pe,se,{x:ue,y:P})}}}function k(w,T){T.disableHighlightStyle(),O(T.grid,P=>{P.highlighted=!0,re(w,P)})}function I(w,T){T.enableHighlightStyle(),O(T.grid,P=>{let X=P.elem;P.highlighted=!1,Z(w,P),X.getAttribute("style")||X.removeAttribute("style")})}let M=(w,T,P,X,ue)=>{const pe=ue==="forward";switch(ue){case"backward":case"forward":return P!==(pe?w.grid.columns-1:0)?(w=T.getCellNodeFromCordsOrThrow(P+(pe?1:-1),X,w.grid),pe?w.selectStart():w.selectEnd()):X!==(pe?w.grid.rows-1:0)?(w=T.getCellNodeFromCordsOrThrow(pe?0:w.grid.columns-1,X+(pe?1:-1),w.grid),pe?w.selectStart():w.selectEnd()):pe?T.selectNext():T.selectPrevious(),!0;case"up":return X!==0?T.getCellNodeFromCordsOrThrow(P,X-1,w.grid).selectEnd():T.selectPrevious(),!0;case"down":return X!==w.grid.rows-1?T.getCellNodeFromCordsOrThrow(P,X+1,w.grid).selectStart():T.selectNext(),!0;default:return!1}},Y=(w,T,P,X,ue)=>{const pe=ue==="forward";switch(ue){case"backward":case"forward":return P!==(pe?w.grid.columns-1:0)&&w.setFocusCellForSelection(T.getCellFromCordsOrThrow(P+(pe?1:-1),X,w.grid)),!0;case"up":return X!==0?(w.setFocusCellForSelection(T.getCellFromCordsOrThrow(P,X-1,w.grid)),!0):!1;case"down":return X!==w.grid.rows-1?(w.setFocusCellForSelection(T.getCellFromCordsOrThrow(P,X+1,w.grid)),!0):!1;default:return!1}};function ee(w,T){if(e.$isRangeSelection(w)||e.DEPRECATED_$isGridSelection(w)){let P=T.isParentOf(w.anchor.getNode());return w=T.isParentOf(w.focus.getNode()),P&&w}return!1}function re(w,T){w=T.elem,T=e.$getNearestNodeFromDOMNode(w),l(T)||v(131),T.getBackgroundColor()===null?w.style.setProperty("background-color","rgb(172,206,247)"):w.style.setProperty("background-image","linear-gradient(to right, rgba(172,206,247,0.85), rgba(172,206,247,0.85))"),w.style.setProperty("caret-color","transparent")}function Z(w,T){w=T.elem,T=e.$getNearestNodeFromDOMNode(w),l(T)||v(131),T.getBackgroundColor()===null&&w.style.removeProperty("background-color"),w.style.removeProperty("background-image"),w.style.removeProperty("caret-color")}function U(w){return w=t.$findMatchingParent(w,l),l(w)?w:null}function J(w){return w=t.$findMatchingParent(w,B),B(w)?w:null}function fe(w,T,P,X,ue){let pe=e.$getSelection();if(!ee(pe,X))return!1;if(e.$isRangeSelection(pe)&&pe.isCollapsed()){if(P==="backward"||P==="forward")return!1;let{anchor:He,focus:le}=pe;var se=t.$findMatchingParent(He.getNode(),l),Ce=t.$findMatchingParent(le.getNode(),l);if(!l(se)||!se.is(Ce))return!1;if(Ce=J(se),Ce!==X&&Ce!=null){var Se=w.getElementByKey(Ce.getKey());if(Se!=null)return ue.grid=N(Se),fe(w,T,P,Ce,ue)}if(Ce=w.getElementByKey(se.__key),Se=w.getElementByKey(He.key),Se==null||Ce==null)return!1;if(He.type==="element")Ce=Se.getBoundingClientRect();else{if(Ce=window.getSelection(),Ce===null||Ce.rangeCount===0)return!1;Ce=Ce.getRangeAt(0).getBoundingClientRect()}if(Se=P==="up"?se.getFirstChild():se.getLastChild(),Se==null||(w=w.getElementByKey(Se.__key),w==null))return!1;if(w=w.getBoundingClientRect(),P==="up"?w.top>Ce.top-Ce.height:Ce.bottom+Ce.height>w.bottom){if(ge(T),w=X.getCordsFromCellNode(se,ue.grid),T.shiftKey)P=X.getCellFromCordsOrThrow(w.x,w.y,ue.grid),ue.setAnchorCellForSelection(P),ue.setFocusCellForSelection(P,!0);else return M(ue,X,w.x,w.y,P);return!0}}else if(e.DEPRECATED_$isGridSelection(pe)){let{anchor:He,focus:le}=pe;return Se=t.$findMatchingParent(He.getNode(),l),Ce=t.$findMatchingParent(le.getNode(),l),[se]=pe.getNodes(),w=w.getElementByKey(se.getKey()),!l(Se)||!l(Ce)||!B(se)||w==null?!1:(ue.updateTableGridSelection(pe),w=N(w),Se=X.getCordsFromCellNode(Se,w),Se=X.getCellFromCordsOrThrow(Se.x,Se.y,w),ue.setAnchorCellForSelection(Se),ge(T),T.shiftKey?(T=X.getCordsFromCellNode(Ce,w),Y(ue,se,T.x,T.y,P)):(Ce.selectEnd(),!0))}return!1}function ge(w){w.preventDefault(),w.stopImmediatePropagation(),w.stopPropagation()}class te extends e.DEPRECATED_GridNode{static getType(){return"table"}static clone(T){return new te(T.__key)}static importDOM(){return{table:()=>({conversion:he,priority:1})}}static importJSON(){return V()}constructor(T){super(T)}exportJSON(){return{...super.exportJSON(),type:"table",version:1}}createDOM(T){let P=document.createElement("table");return t.addClassNamesToElement(P,T.theme.table),P}updateDOM(){return!1}exportDOM(T){return{...super.exportDOM(T),after:P=>{if(P){let X=P.cloneNode(),ue=document.createElement("colgroup"),pe=document.createElement("tbody");if(t.isHTMLElement(P)&&pe.append(...P.children),P=this.getFirstChildOrThrow(),!_(P))throw Error("Expected to find row node.");P=P.getChildrenSize();for(let se=0;se<P;se++){let Ce=document.createElement("col");ue.append(Ce)}return X.replaceChildren(ue,pe),X}}}}canExtractContents(){return!1}canBeEmpty(){return!1}isShadowRoot(){return!0}getCordsFromCellNode(T,P){let{rows:X,cells:ue}=P;for(P=0;P<X;P++){var pe=ue[P];if(pe!=null&&(pe=pe.findIndex(se=>{if(se)return{elem:se}=se,e.$getNearestNodeFromDOMNode(se)===T}),pe!==-1))return{x:pe,y:P}}throw Error("Cell not found in table.")}getCellFromCords(T,P,X){return{cells:X}=X,P=X[P],P==null?null:(T=P[T],T??null)}getCellFromCordsOrThrow(T,P,X){if(T=this.getCellFromCords(T,P,X),!T)throw Error("Cell not found at cords.");return T}getCellNodeFromCords(T,P,X){return T=this.getCellFromCords(T,P,X),T==null?null:(T=e.$getNearestNodeFromDOMNode(T.elem),l(T)?T:null)}getCellNodeFromCordsOrThrow(T,P,X){if(T=this.getCellNodeFromCords(T,P,X),!T)throw Error("Node at cords not TableCellNode.");return T}canSelectBefore(){return!0}canIndent(){return!1}}function he(){return{node:V()}}function V(){return e.$applyNodeReplacement(new te)}function B(w){return w instanceof te}function q(w){if(w=t.$findMatchingParent(w,T=>_(T)),_(w))return w;throw Error("Expected table cell to be inside of table row.")}function ie(w){if(w=t.$findMatchingParent(w,T=>B(T)),B(w))return w;throw Error("Expected table cell to be inside of table.")}function H(w,T){let P=ie(w),{x:X,y:ue}=P.getCordsFromCellNode(w,T);return{above:P.getCellNodeFromCords(X,ue-1,T),below:P.getCellNodeFromCords(X,ue+1,T),left:P.getCellNodeFromCords(X-1,ue,T),right:P.getCellNodeFromCords(X+1,ue,T)}}function j(w){let T=w.getFirstDescendant();T==null?w.selectStart():T.getParentOrThrow().selectStart()}function Q(w,T){let P=w.getFirstChild();P!==null?P.insertBefore(T):w.append(T)}let F=e.createCommand("INSERT_TABLE_COMMAND");return nn.$createTableCellNode=a,nn.$createTableNode=V,nn.$createTableNodeWithDimensions=function(w,T,P=!0){let X=V();for(let pe=0;pe<w;pe++){let se=m();for(let Ce=0;Ce<T;Ce++){var ue=r.NO_STATUS;typeof P=="object"?(pe===0&&P.rows&&(ue|=r.ROW),Ce===0&&P.columns&&(ue|=r.COLUMN)):P&&(pe===0&&(ue|=r.ROW),Ce===0&&(ue|=r.COLUMN)),ue=a(ue);let Se=e.$createParagraphNode();Se.append(e.$createTextNode()),ue.append(Se),se.append(ue)}X.append(se)}return X},nn.$createTableRowNode=m,nn.$deleteTableColumn=function(w,T){let P=w.getChildren();for(let ue=0;ue<P.length;ue++){var X=P[ue];if(_(X)){if(X=X.getChildren(),T>=X.length||0>T)throw Error("Table column target index out of range");X[T].remove()}}return w},nn.$deleteTableColumn__EXPERIMENTAL=function(){var w=e.$getSelection();if(!e.$INTERNAL_isPointSelection(w))throw Error("Expected a INTERNAL_PointSelection");var T=w.anchor.getNode();w=w.focus.getNode();let[P,,X]=e.DEPRECATED_$getNodeTriplet(T);[T]=e.DEPRECATED_$getNodeTriplet(w);let[ue,pe,se]=e.DEPRECATED_$computeGridMap(X,P,T);var{startColumn:Ce}=pe;let{startRow:Se,startColumn:He}=se;w=Math.min(Ce,He),Ce=Math.max(Ce+P.__colSpan-1,He+T.__colSpan-1);let le=Ce-w+1;if(ue[0].length===Ce-w+1)X.selectPrevious(),X.remove();else{var ce=ue.length;for(let ve=0;ve<ce;ve++)for(let ke=w;ke<=Ce;ke++){let{cell:Pe,startColumn:Fe}=ue[ve][ke];Fe<w?ke===w&&Pe.setColSpan(Pe.__colSpan-Math.min(le,Pe.__colSpan-(w-Fe))):Fe+Pe.__colSpan-1>Ce?ke===Ce&&Pe.setColSpan(Pe.__colSpan-(Ce-Fe+1)):Pe.remove()}w=ue[Se],T=w[He+T.__colSpan],T!==void 0?({cell:T}=T,j(T)):({cell:T}=w[He-1],j(T))}},nn.$deleteTableRow__EXPERIMENTAL=function(){var w=e.$getSelection();if(!e.$INTERNAL_isPointSelection(w))throw Error("Expected a INTERNAL_PointSelection");var T=w.anchor.getNode();w=w.focus.getNode();let[P,,X]=e.DEPRECATED_$getNodeTriplet(T);[w]=e.DEPRECATED_$getNodeTriplet(w);let[ue,pe,se]=e.DEPRECATED_$computeGridMap(X,P,w);({startRow:T}=pe);var{startRow:Ce}=se;if(w=Ce+w.__rowSpan-1,ue.length===w-T+1)X.remove();else{Ce=ue[0].length;var Se=ue[w+1],He=X.getChildAtIndex(w+1);for(let ce=w;ce>=T;ce--){for(var le=Ce-1;0<=le;le--){let{cell:ve,startRow:ke,startColumn:Pe}=ue[ce][le];if(Pe===le&&(ce===T&&ke<T&&ve.setRowSpan(ve.__rowSpan-(ke-T)),ke>=T&&ke+ve.__rowSpan-1>w))if(ve.setRowSpan(ve.__rowSpan-(w-ke+1)),He===null&&v(122),le===0)Q(He,ve);else{let{cell:Fe}=Se[le-1];Fe.insertAfter(ve)}}le=X.getChildAtIndex(ce),e.DEPRECATED_$isGridRowNode(le)||v(123,String(ce)),le.remove()}Se!==void 0?({cell:T}=Se[0],j(T)):({cell:T}=ue[T-1][0],j(T))}},nn.$getElementGridForTableNode=function(w,T){if(w=w.getElementByKey(T.getKey()),w==null)throw Error("Table Element Not Found");return N(w)},nn.$getTableCellNodeFromLexicalNode=function(w){return w=t.$findMatchingParent(w,T=>l(T)),l(w)?w:null},nn.$getTableColumnIndexFromTableCellNode=function(w){return q(w).getChildren().findIndex(T=>T.is(w))},nn.$getTableNodeFromLexicalNodeOrThrow=ie,nn.$getTableRowIndexFromTableCellNode=function(w){let T=q(w);return ie(T).getChildren().findIndex(P=>P.is(T))},nn.$getTableRowNodeFromTableCellNodeOrThrow=q,nn.$insertTableColumn=function(w,T,P=!0,X,ue){let pe=w.getChildren(),se=[];for(let He=0;He<pe.length;He++){let le=pe[He];if(_(le))for(let ce=0;ce<X;ce++){var Ce=le.getChildren();if(T>=Ce.length||0>T)throw Error("Table column target index out of range");Ce=Ce[T],l(Ce)||v(12);let{left:ve,right:ke}=H(Ce,ue);var Se=r.NO_STATUS;(ve&&ve.hasHeaderState(r.ROW)||ke&&ke.hasHeaderState(r.ROW))&&(Se|=r.ROW),Se=a(Se),Se.append(e.$createParagraphNode()),se.push({newTableCell:Se,targetCell:Ce})}}return se.forEach(({newTableCell:He,targetCell:le})=>{P?le.insertAfter(He):le.insertBefore(He)}),w},nn.$insertTableColumn__EXPERIMENTAL=function(w=!0){function T(){let ce=a(r.NO_STATUS).append(e.$createParagraphNode());return He===null&&(He=ce),ce}var P=e.$getSelection();if(!e.$INTERNAL_isPointSelection(P))throw Error("Expected a PointSeleciton");var X=P.anchor.getNode();P=P.focus.getNode(),[X]=e.DEPRECATED_$getNodeTriplet(X);let[ue,,pe]=e.DEPRECATED_$getNodeTriplet(P),[se,Ce,Se]=e.DEPRECATED_$computeGridMap(pe,ue,X);X=se.length,P=w?Math.max(Ce.startColumn,Se.startColumn):Math.min(Ce.startColumn,Se.startColumn),w=w?P+ue.__colSpan-1:P-1,P=pe.getFirstChild(),e.DEPRECATED_$isGridRowNode(P)||v(120);let He=null;var le=P;e:for(P=0;P<X;P++){P!==0&&(le=le.getNextSibling(),e.DEPRECATED_$isGridRowNode(le)||v(121));let ce=se[P];if(0>w){Q(le,T());continue}let{cell:ve,startColumn:ke,startRow:Pe}=ce[w];if(ke+ve.__colSpan-1<=w){let Fe=ve,Qe=Pe,st=w;for(;Qe!==P&&1<Fe.__rowSpan;)if(st-=ve.__colSpan,0<=st){let{cell:dt,startRow:At}=ce[st];Fe=dt,Qe=At}else{le.append(T());continue e}Fe.insertAfter(T())}else ve.setColSpan(ve.__colSpan+1)}He!==null&&j(He)},nn.$insertTableRow=function(w,T,P=!0,X,ue){var pe=w.getChildren();if(T>=pe.length||0>T)throw Error("Table row target index out of range");if(T=pe[T],_(T))for(pe=0;pe<X;pe++){let Ce=T.getChildren(),Se=Ce.length,He=m();for(let le=0;le<Se;le++){var se=Ce[le];l(se)||v(12);let{above:ce,below:ve}=H(se,ue);se=r.NO_STATUS;let ke=ce&&ce.getWidth()||ve&&ve.getWidth()||void 0;(ce&&ce.hasHeaderState(r.COLUMN)||ve&&ve.hasHeaderState(r.COLUMN))&&(se|=r.COLUMN),se=a(se,1,ke),se.append(e.$createParagraphNode()),He.append(se)}P?T.insertAfter(He):T.insertBefore(He)}else throw Error("Row before insertion index does not exist.");return w},nn.$insertTableRow__EXPERIMENTAL=function(w=!0){var T=e.$getSelection();if(!e.$INTERNAL_isPointSelection(T))throw Error("Expected a INTERNAL_PointSelection");T=T.focus.getNode();let[P,,X]=e.DEPRECATED_$getNodeTriplet(T),[ue,pe]=e.DEPRECATED_$computeGridMap(X,P,P);T=ue[0].length;var{startRow:se}=pe;if(w){w=se+P.__rowSpan-1;var Ce=ue[w];se=m();for(var Se=0;Se<T;Se++){let{cell:He,startRow:le}=Ce[Se];le+He.__rowSpan-1<=w?se.append(a(r.NO_STATUS)):He.setRowSpan(He.__rowSpan+1)}T=X.getChildAtIndex(w),e.DEPRECATED_$isGridRowNode(T)||v(119),T.insertAfter(se)}else{for(Ce=ue[se],w=m(),Se=0;Se<T;Se++){let{cell:He,startRow:le}=Ce[Se];le===se?w.append(a(r.NO_STATUS)):He.setRowSpan(He.__rowSpan+1)}T=X.getChildAtIndex(se),e.DEPRECATED_$isGridRowNode(T)||v(119),T.insertBefore(w)}},nn.$isTableCellNode=l,nn.$isTableNode=B,nn.$isTableRowNode=_,nn.$removeTableRowAtIndex=function(w,T){let P=w.getChildren();if(T>=P.length||0>T)throw Error("Expected table cell to be inside of table row.");return P[T].remove(),w},nn.$unmergeCell=function(){var w=e.$getSelection();if(!e.$INTERNAL_isPointSelection(w))throw Error("Expected a INTERNAL_PointSelection");w=w.anchor.getNode();let[T,P,X]=e.DEPRECATED_$getNodeTriplet(w);w=T.__colSpan;let ue=T.__rowSpan;if(1<w){for(var pe=1;pe<w;pe++)T.insertAfter(a(r.NO_STATUS));T.setColSpan(1)}if(1<ue){let[Se,He]=e.DEPRECATED_$computeGridMap(X,T,T),{startColumn:le,startRow:ce}=He,ve;for(pe=1;pe<ue;pe++){var se=ce+pe;let ke=Se[se];ve=(ve||P).getNextSibling(),e.DEPRECATED_$isGridRowNode(ve)||v(125);var Ce=null;for(let Pe=0;Pe<le;Pe++){let Fe=ke[Pe],Qe=Fe.cell;Fe.startRow===se&&(Ce=Qe),1<Qe.__colSpan&&(Pe+=Qe.__colSpan-1)}if(Ce===null)for(Ce=0;Ce<w;Ce++)Q(ve,a(r.NO_STATUS));else for(se=0;se<w;se++)Ce.insertAfter(a(r.NO_STATUS))}T.setRowSpan(1)}},nn.INSERT_TABLE_COMMAND=F,nn.TableCellHeaderStates=r,nn.TableCellNode=o,nn.TableNode=te,nn.TableRowNode=u,nn.TableSelection=b,nn.applyTableHandlers=function(w,T,P,X){function ue(le){return le=w.getCordsFromCellNode(le,se.grid),w.getCellFromCordsOrThrow(le.x,le.y,se.grid)}let pe=P.getRootElement();if(pe===null)throw Error("No root element.");let se=new b(P,w.getKey()),Ce=P._window||window;T.__lexicalTableSelection=se,T.addEventListener("mousedown",le=>{setTimeout(()=>{if(le.button===0&&Ce){var ce=y(le.target);ce!==null&&(ge(le),se.setAnchorCellForSelection(ce));var ve=()=>{Ce.removeEventListener("mouseup",ve),Ce.removeEventListener("mousemove",ke)},ke=Pe=>{const Fe=y(Pe.target);Fe===null||se.anchorX===Fe.x&&se.anchorY===Fe.y||(Pe.preventDefault(),se.setFocusCellForSelection(Fe))};Ce.addEventListener("mouseup",ve),Ce.addEventListener("mousemove",ke)}},0)});let Se=le=>{le.button===0&&P.update(()=>{const ce=e.$getSelection(),ve=le.target;e.DEPRECATED_$isGridSelection(ce)&&ce.gridKey===se.tableNodeKey&&pe.contains(ve)&&se.clearHighlight()})};Ce.addEventListener("mousedown",Se),se.listenersToRemove.add(()=>Ce.removeEventListener("mousedown",Se)),se.listenersToRemove.add(P.registerCommand(e.KEY_ARROW_DOWN_COMMAND,le=>fe(P,le,"down",w,se),e.COMMAND_PRIORITY_HIGH)),se.listenersToRemove.add(P.registerCommand(e.KEY_ARROW_UP_COMMAND,le=>fe(P,le,"up",w,se),e.COMMAND_PRIORITY_HIGH)),se.listenersToRemove.add(P.registerCommand(e.KEY_ARROW_LEFT_COMMAND,le=>fe(P,le,"backward",w,se),e.COMMAND_PRIORITY_HIGH)),se.listenersToRemove.add(P.registerCommand(e.KEY_ARROW_RIGHT_COMMAND,le=>fe(P,le,"forward",w,se),e.COMMAND_PRIORITY_HIGH)),se.listenersToRemove.add(P.registerCommand(e.KEY_ESCAPE_COMMAND,le=>{var ce=e.$getSelection();return e.DEPRECATED_$isGridSelection(ce)&&(ce=t.$findMatchingParent(ce.focus.getNode(),l),l(ce))?(ge(le),ce.selectEnd(),!0):!1},e.COMMAND_PRIORITY_HIGH));let He=le=>()=>{var ce=e.$getSelection();if(!ee(ce,w))return!1;if(e.DEPRECATED_$isGridSelection(ce))return se.clearText(),!0;if(e.$isRangeSelection(ce)){const Pe=t.$findMatchingParent(ce.anchor.getNode(),Fe=>l(Fe));if(!l(Pe))return!1;var ve=ce.anchor.getNode(),ke=ce.focus.getNode();if(ve=w.isParentOf(ve),ke=w.isParentOf(ke),ve&&!ke||ke&&!ve)return se.clearText(),!0;if(ve=(ke=t.$findMatchingParent(ce.anchor.getNode(),Fe=>e.$isElementNode(Fe)))&&t.$findMatchingParent(ke,Fe=>e.$isElementNode(Fe)&&l(Fe.getParent())),!e.$isElementNode(ve)||!e.$isElementNode(ke))return!1;if(le===e.DELETE_LINE_COMMAND&&ve.getPreviousSibling()===null)return!0;if((le===e.DELETE_CHARACTER_COMMAND||le===e.DELETE_WORD_COMMAND)&&ce.isCollapsed()&&ce.anchor.offset===0&&ke!==ve){ce=ke.getChildren();const Fe=e.$createParagraphNode();return ce.forEach(Qe=>Fe.append(Qe)),ke.replace(Fe),ke.getWritable().__parent=Pe.getKey(),!0}}return!1};return[e.DELETE_WORD_COMMAND,e.DELETE_LINE_COMMAND,e.DELETE_CHARACTER_COMMAND].forEach(le=>{se.listenersToRemove.add(P.registerCommand(le,He(le),e.COMMAND_PRIORITY_CRITICAL))}),T=le=>{const ce=e.$getSelection();return ee(ce,w)?e.DEPRECATED_$isGridSelection(ce)?(le.preventDefault(),le.stopPropagation(),se.clearText(),!0):(e.$isRangeSelection(ce)&&(le=t.$findMatchingParent(ce.anchor.getNode(),ve=>l(ve)),l(le)),!1):!1},se.listenersToRemove.add(P.registerCommand(e.KEY_BACKSPACE_COMMAND,T,e.COMMAND_PRIORITY_CRITICAL)),se.listenersToRemove.add(P.registerCommand(e.KEY_DELETE_COMMAND,T,e.COMMAND_PRIORITY_CRITICAL)),se.listenersToRemove.add(P.registerCommand(e.FORMAT_TEXT_COMMAND,le=>{let ce=e.$getSelection();return ee(ce,w)?e.DEPRECATED_$isGridSelection(ce)?(se.formatCells(le),!0):(e.$isRangeSelection(ce)&&(le=t.$findMatchingParent(ce.anchor.getNode(),ve=>l(ve)),l(le)),!1):!1},e.COMMAND_PRIORITY_CRITICAL)),se.listenersToRemove.add(P.registerCommand(e.CONTROLLED_TEXT_INSERTION_COMMAND,()=>{var le=e.$getSelection();return ee(le,w)&&(e.DEPRECATED_$isGridSelection(le)?se.clearHighlight():e.$isRangeSelection(le)&&(le=t.$findMatchingParent(le.anchor.getNode(),ce=>l(ce)),l(le))),!1},e.COMMAND_PRIORITY_CRITICAL)),X&&se.listenersToRemove.add(P.registerCommand(e.KEY_TAB_COMMAND,le=>{var ce=e.$getSelection();return!e.$isRangeSelection(ce)||!ce.isCollapsed()||!ee(ce,w)||(ce=U(ce.anchor.getNode()),ce===null)?!1:(ge(le),ce=w.getCordsFromCellNode(ce,se.grid),M(se,w,ce.x,ce.y,le.shiftKey?"backward":"forward"),!0)},e.COMMAND_PRIORITY_CRITICAL)),se.listenersToRemove.add(P.registerCommand(e.FOCUS_COMMAND,()=>w.isSelected(),e.COMMAND_PRIORITY_HIGH)),se.listenersToRemove.add(P.registerCommand(e.SELECTION_CHANGE_COMMAND,()=>{let le=e.$getSelection(),ce=e.$getPreviousSelection();if(e.$isRangeSelection(le)){let{anchor:Qe,focus:st}=le;var ve=Qe.getNode(),ke=st.getNode();ve=U(ve),ke=U(ke);var Pe=ve&&w.is(J(ve)),Fe=ke&&w.is(J(ke));let dt=Pe!==Fe;Fe=Pe&&Fe,Pe=le.isBackward(),dt?(ve=le.clone(),ve.focus.set(w.getKey(),Pe?0:w.getChildrenSize(),"element"),e.$setSelection(ve),k(P,se)):Fe&&!ve.is(ke)&&(se.setAnchorCellForSelection(ue(ve)),se.setFocusCellForSelection(ue(ke),!0))}return le&&!le.is(ce)&&(e.DEPRECATED_$isGridSelection(le)||e.DEPRECATED_$isGridSelection(ce))&&se.gridSelection&&!se.gridSelection.is(ce)?(e.DEPRECATED_$isGridSelection(le)&&le.gridKey===se.tableNodeKey?se.updateTableGridSelection(le):!e.DEPRECATED_$isGridSelection(le)&&e.DEPRECATED_$isGridSelection(ce)&&ce.gridKey===se.tableNodeKey&&se.updateTableGridSelection(null),!1):(se.hasHijackedSelectionStyles&&!w.isSelected()?I(P,se):!se.hasHijackedSelectionStyles&&w.isSelected()&&k(P,se),!1)},e.COMMAND_PRIORITY_CRITICAL)),se},nn.getCellFromTarget=y,nn.getTableSelectionFromTableElement=function(w){return w.__lexicalTableSelection},nn}var o0,i0;function kg(){return i0||(i0=1,o0=process.env.NODE_ENV==="development"?sA():lA()),o0}var a0;function cA(){if(a0)return Uh;a0=1;var e=ur(),t=kg(),n=vn(),r=Xt(),o=z;function i({hasCellMerge:a=!0,hasCellBackgroundColor:l=!0,hasTabHandler:u=!0}){const[p]=e.useLexicalComposerContext();return o.useEffect(()=>{if(!p.hasNodes([t.TableNode,t.TableCellNode,t.TableRowNode]))throw Error("TablePlugin: TableNode, TableCellNode or TableRowNode not registered on editor");return p.registerCommand(t.INSERT_TABLE_COMMAND,({columns:m,rows:_,includeHeaders:v})=>{const C=t.$createTableNodeWithDimensions(Number(_),Number(m),v);n.$insertNodeToNearestRoot(C);const b=C.getFirstDescendant();return r.$isTextNode(b)&&b.select(),!0},r.COMMAND_PRIORITY_EDITOR)},[p]),o.useEffect(()=>{const m=new Map,_=C=>{const b=C.getKey(),y=p.getElementByKey(b);if(y&&!m.has(b)){const N=t.applyTableHandlers(C,y,p,u);m.set(b,N)}};p.getEditorState().read(()=>{const C=r.$nodesOfType(t.TableNode);for(const b of C)t.$isTableNode(b)&&_(b)});const v=p.registerMutationListener(t.TableNode,C=>{for(const[b,y]of C)if(y==="created")p.getEditorState().read(()=>{const N=r.$getNodeByKey(b);t.$isTableNode(N)&&_(N)});else if(y==="destroyed"){const N=m.get(b);N!==void 0&&(N.removeListeners(),m.delete(b))}});return()=>{v();for(const[,C]of m)C.removeListeners()}},[p,u]),o.useEffect(()=>{if(!a)return p.registerNodeTransform(t.TableCellNode,m=>{if(m.getColSpan()>1||m.getRowSpan()>1){const[,,_]=r.DEPRECATED_$getNodeTriplet(m),[v]=r.DEPRECATED_$computeGridMap(_,m,m),C=v.length,b=v[0].length;let y=_.getFirstChild();if(!r.DEPRECATED_$isGridRowNode(y))throw Error("Expected TableNode first child to be a RowNode");const N=[];for(let R=0;R<C;R++){if(R!==0&&(y=y.getNextSibling(),!r.DEPRECATED_$isGridRowNode(y)))throw Error("Expected TableNode first child to be a RowNode");let O=null;for(let k=0;k<b;k++){const I=v[R][k],M=I.cell;if(I.startRow===R&&I.startColumn===k)O=M,N.push(M);else if(M.getColSpan()>1||M.getRowSpan()>1){const Y=t.$createTableCellNode(M.__headerState);O!==null?O.insertAfter(Y):n.$insertFirst(y,Y)}}}for(const R of N)R.setColSpan(1),R.setRowSpan(1)}})},[p,a]),o.useEffect(()=>{if(!l)return p.registerNodeTransform(t.TableCellNode,m=>{m.getBackgroundColor()!==null&&m.setBackgroundColor(null)})},[p,l,a]),null}return Uh.TablePlugin=i,Uh}var Vh={},s0;function uA(){if(s0)return Vh;s0=1;var e=ur(),t=kg(),n=vn(),r=Xt(),o=z;function i(a){let l=new URLSearchParams;l.append("code",a);for(let u=1;u<arguments.length;u++)l.append("v",arguments[u]);throw Error(`Minified Lexical error #${a}; visit https://lexical.dev/docs/error?${l} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}return Vh.TablePlugin=function({hasCellMerge:a=!0,hasCellBackgroundColor:l=!0,hasTabHandler:u=!0}){let[p]=e.useLexicalComposerContext();return o.useEffect(()=>(p.hasNodes([t.TableNode,t.TableCellNode,t.TableRowNode])||i(10),p.registerCommand(t.INSERT_TABLE_COMMAND,({columns:m,rows:_,includeHeaders:v})=>(m=t.$createTableNodeWithDimensions(Number(_),Number(m),v),n.$insertNodeToNearestRoot(m),m=m.getFirstDescendant(),r.$isTextNode(m)&&m.select(),!0),r.COMMAND_PRIORITY_EDITOR)),[p]),o.useEffect(()=>{let m=new Map,_=C=>{const b=C.getKey(),y=p.getElementByKey(b);y&&!m.has(b)&&(C=t.applyTableHandlers(C,y,p,u),m.set(b,C))};p.getEditorState().read(()=>{let C=r.$nodesOfType(t.TableNode);for(let b of C)t.$isTableNode(b)&&_(b)});let v=p.registerMutationListener(t.TableNode,C=>{for(const[b,y]of C)y==="created"?p.getEditorState().read(()=>{const N=r.$getNodeByKey(b);t.$isTableNode(N)&&_(N)}):y==="destroyed"&&(C=m.get(b),C!==void 0&&(C.removeListeners(),m.delete(b)))});return()=>{v();for(let[,C]of m)C.removeListeners()}},[p,u]),o.useEffect(()=>{if(!a)return p.registerNodeTransform(t.TableCellNode,m=>{if(1<m.getColSpan()||1<m.getRowSpan()){var[,,_]=r.DEPRECATED_$getNodeTriplet(m);[m]=r.DEPRECATED_$computeGridMap(_,m,m);let C=m.length,b=m[0].length;if(_=_.getFirstChild(),!r.DEPRECATED_$isGridRowNode(_))throw Error("Expected TableNode first child to be a RowNode");let y=[];for(let N=0;N<C;N++){if(N!==0&&(_=_.getNextSibling(),!r.DEPRECATED_$isGridRowNode(_)))throw Error("Expected TableNode first child to be a RowNode");let R=null;for(let O=0;O<b;O++){var v=m[N][O];let k=v.cell;v.startRow===N&&v.startColumn===O?(R=k,y.push(k)):(1<k.getColSpan()||1<k.getRowSpan())&&(v=t.$createTableCellNode(k.__headerState),R!==null?R.insertAfter(v):n.$insertFirst(_,v))}}for(let N of y)N.setColSpan(1),N.setRowSpan(1)}})},[p,a]),o.useEffect(()=>{if(!l)return p.registerNodeTransform(t.TableCellNode,m=>{m.getBackgroundColor()!==null&&m.setBackgroundColor(null)})},[p,l,a]),null},Vh}process.env.NODE_ENV==="development"?cA():uA();var Vn={},l0={exports:{}},c0;function tE(){return c0||(c0=1,function(e){var t=typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{};/**
|
|
103
|
-
* Prism: Lightweight, robust, elegant syntax highlighting
|
|
104
|
-
*
|
|
105
|
-
* @license MIT <https://opensource.org/licenses/MIT>
|
|
106
|
-
* @author Lea Verou <https://lea.verou.me>
|
|
107
|
-
* @namespace
|
|
108
|
-
* @public
|
|
109
|
-
*/var n=function(r){var o=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,i=0,a={},l={manual:r.Prism&&r.Prism.manual,disableWorkerMessageHandler:r.Prism&&r.Prism.disableWorkerMessageHandler,util:{encode:function O(k){return k instanceof u?new u(k.type,O(k.content),k.alias):Array.isArray(k)?k.map(O):k.replace(/&/g,"&").replace(/</g,"<").replace(/\u00a0/g," ")},type:function(O){return Object.prototype.toString.call(O).slice(8,-1)},objId:function(O){return O.__id||Object.defineProperty(O,"__id",{value:++i}),O.__id},clone:function O(k,I){I=I||{};var M,Y;switch(l.util.type(k)){case"Object":if(Y=l.util.objId(k),I[Y])return I[Y];M={},I[Y]=M;for(var ee in k)k.hasOwnProperty(ee)&&(M[ee]=O(k[ee],I));return M;case"Array":return Y=l.util.objId(k),I[Y]?I[Y]:(M=[],I[Y]=M,k.forEach(function(re,Z){M[Z]=O(re,I)}),M);default:return k}},getLanguage:function(O){for(;O;){var k=o.exec(O.className);if(k)return k[1].toLowerCase();O=O.parentElement}return"none"},setLanguage:function(O,k){O.className=O.className.replace(RegExp(o,"gi"),""),O.classList.add("language-"+k)},currentScript:function(){if(typeof document>"u")return null;if("currentScript"in document)return document.currentScript;try{throw new Error}catch(M){var O=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(M.stack)||[])[1];if(O){var k=document.getElementsByTagName("script");for(var I in k)if(k[I].src==O)return k[I]}return null}},isActive:function(O,k,I){for(var M="no-"+k;O;){var Y=O.classList;if(Y.contains(k))return!0;if(Y.contains(M))return!1;O=O.parentElement}return!!I}},languages:{plain:a,plaintext:a,text:a,txt:a,extend:function(O,k){var I=l.util.clone(l.languages[O]);for(var M in k)I[M]=k[M];return I},insertBefore:function(O,k,I,M){M=M||l.languages;var Y=M[O],ee={};for(var re in Y)if(Y.hasOwnProperty(re)){if(re==k)for(var Z in I)I.hasOwnProperty(Z)&&(ee[Z]=I[Z]);I.hasOwnProperty(re)||(ee[re]=Y[re])}var U=M[O];return M[O]=ee,l.languages.DFS(l.languages,function(J,fe){fe===U&&J!=O&&(this[J]=ee)}),ee},DFS:function O(k,I,M,Y){Y=Y||{};var ee=l.util.objId;for(var re in k)if(k.hasOwnProperty(re)){I.call(k,re,k[re],M||re);var Z=k[re],U=l.util.type(Z);U==="Object"&&!Y[ee(Z)]?(Y[ee(Z)]=!0,O(Z,I,null,Y)):U==="Array"&&!Y[ee(Z)]&&(Y[ee(Z)]=!0,O(Z,I,re,Y))}}},plugins:{},highlightAll:function(O,k){l.highlightAllUnder(document,O,k)},highlightAllUnder:function(O,k,I){var M={callback:I,container:O,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};l.hooks.run("before-highlightall",M),M.elements=Array.prototype.slice.apply(M.container.querySelectorAll(M.selector)),l.hooks.run("before-all-elements-highlight",M);for(var Y=0,ee;ee=M.elements[Y++];)l.highlightElement(ee,k===!0,M.callback)},highlightElement:function(O,k,I){var M=l.util.getLanguage(O),Y=l.languages[M];l.util.setLanguage(O,M);var ee=O.parentElement;ee&&ee.nodeName.toLowerCase()==="pre"&&l.util.setLanguage(ee,M);var re=O.textContent,Z={element:O,language:M,grammar:Y,code:re};function U(fe){Z.highlightedCode=fe,l.hooks.run("before-insert",Z),Z.element.innerHTML=Z.highlightedCode,l.hooks.run("after-highlight",Z),l.hooks.run("complete",Z),I&&I.call(Z.element)}if(l.hooks.run("before-sanity-check",Z),ee=Z.element.parentElement,ee&&ee.nodeName.toLowerCase()==="pre"&&!ee.hasAttribute("tabindex")&&ee.setAttribute("tabindex","0"),!Z.code){l.hooks.run("complete",Z),I&&I.call(Z.element);return}if(l.hooks.run("before-highlight",Z),!Z.grammar){U(l.util.encode(Z.code));return}if(k&&r.Worker){var J=new Worker(l.filename);J.onmessage=function(fe){U(fe.data)},J.postMessage(JSON.stringify({language:Z.language,code:Z.code,immediateClose:!0}))}else U(l.highlight(Z.code,Z.grammar,Z.language))},highlight:function(O,k,I){var M={code:O,grammar:k,language:I};if(l.hooks.run("before-tokenize",M),!M.grammar)throw new Error('The language "'+M.language+'" has no grammar.');return M.tokens=l.tokenize(M.code,M.grammar),l.hooks.run("after-tokenize",M),u.stringify(l.util.encode(M.tokens),M.language)},tokenize:function(O,k){var I=k.rest;if(I){for(var M in I)k[M]=I[M];delete k.rest}var Y=new _;return v(Y,Y.head,O),m(O,Y,k,Y.head,0),b(Y)},hooks:{all:{},add:function(O,k){var I=l.hooks.all;I[O]=I[O]||[],I[O].push(k)},run:function(O,k){var I=l.hooks.all[O];if(!(!I||!I.length))for(var M=0,Y;Y=I[M++];)Y(k)}},Token:u};r.Prism=l;function u(O,k,I,M){this.type=O,this.content=k,this.alias=I,this.length=(M||"").length|0}u.stringify=function O(k,I){if(typeof k=="string")return k;if(Array.isArray(k)){var M="";return k.forEach(function(U){M+=O(U,I)}),M}var Y={type:k.type,content:O(k.content,I),tag:"span",classes:["token",k.type],attributes:{},language:I},ee=k.alias;ee&&(Array.isArray(ee)?Array.prototype.push.apply(Y.classes,ee):Y.classes.push(ee)),l.hooks.run("wrap",Y);var re="";for(var Z in Y.attributes)re+=" "+Z+'="'+(Y.attributes[Z]||"").replace(/"/g,""")+'"';return"<"+Y.tag+' class="'+Y.classes.join(" ")+'"'+re+">"+Y.content+"</"+Y.tag+">"};function p(O,k,I,M){O.lastIndex=k;var Y=O.exec(I);if(Y&&M&&Y[1]){var ee=Y[1].length;Y.index+=ee,Y[0]=Y[0].slice(ee)}return Y}function m(O,k,I,M,Y,ee){for(var re in I)if(!(!I.hasOwnProperty(re)||!I[re])){var Z=I[re];Z=Array.isArray(Z)?Z:[Z];for(var U=0;U<Z.length;++U){if(ee&&ee.cause==re+","+U)return;var J=Z[U],fe=J.inside,ge=!!J.lookbehind,te=!!J.greedy,he=J.alias;if(te&&!J.pattern.global){var V=J.pattern.toString().match(/[imsuy]*$/)[0];J.pattern=RegExp(J.pattern.source,V+"g")}for(var B=J.pattern||J,q=M.next,ie=Y;q!==k.tail&&!(ee&&ie>=ee.reach);ie+=q.value.length,q=q.next){var H=q.value;if(k.length>O.length)return;if(!(H instanceof u)){var j=1,Q;if(te){if(Q=p(B,ie,O,ge),!Q||Q.index>=O.length)break;var P=Q.index,F=Q.index+Q[0].length,w=ie;for(w+=q.value.length;P>=w;)q=q.next,w+=q.value.length;if(w-=q.value.length,ie=w,q.value instanceof u)continue;for(var T=q;T!==k.tail&&(w<F||typeof T.value=="string");T=T.next)j++,w+=T.value.length;j--,H=O.slice(ie,w),Q.index-=ie}else if(Q=p(B,0,H,ge),!Q)continue;var P=Q.index,X=Q[0],ue=H.slice(0,P),pe=H.slice(P+X.length),se=ie+H.length;ee&&se>ee.reach&&(ee.reach=se);var Ce=q.prev;ue&&(Ce=v(k,Ce,ue),ie+=ue.length),C(k,Ce,j);var Se=new u(re,fe?l.tokenize(X,fe):X,he,X);if(q=v(k,Ce,Se),pe&&v(k,q,pe),j>1){var He={cause:re+","+U,reach:se};m(O,k,I,q.prev,ie,He),ee&&He.reach>ee.reach&&(ee.reach=He.reach)}}}}}}function _(){var O={value:null,prev:null,next:null},k={value:null,prev:O,next:null};O.next=k,this.head=O,this.tail=k,this.length=0}function v(O,k,I){var M=k.next,Y={value:I,prev:k,next:M};return k.next=Y,M.prev=Y,O.length++,Y}function C(O,k,I){for(var M=k.next,Y=0;Y<I&&M!==O.tail;Y++)M=M.next;k.next=M,M.prev=k,O.length-=Y}function b(O){for(var k=[],I=O.head.next;I!==O.tail;)k.push(I.value),I=I.next;return k}if(!r.document)return r.addEventListener&&(l.disableWorkerMessageHandler||r.addEventListener("message",function(O){var k=JSON.parse(O.data),I=k.language,M=k.code,Y=k.immediateClose;r.postMessage(l.highlight(M,l.languages[I],I)),Y&&r.close()},!1)),l;var y=l.util.currentScript();y&&(l.filename=y.src,y.hasAttribute("data-manual")&&(l.manual=!0));function N(){l.manual||l.highlightAll()}if(!l.manual){var R=document.readyState;R==="loading"||R==="interactive"&&y&&y.defer?document.addEventListener("DOMContentLoaded",N):window.requestAnimationFrame?window.requestAnimationFrame(N):window.setTimeout(N,16)}return l}(t);e.exports&&(e.exports=n),typeof jv<"u"&&(jv.Prism=n),n.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},n.languages.markup.tag.inside["attr-value"].inside.entity=n.languages.markup.entity,n.languages.markup.doctype.inside["internal-subset"].inside=n.languages.markup,n.hooks.add("wrap",function(r){r.type==="entity"&&(r.attributes.title=r.content.replace(/&/,"&"))}),Object.defineProperty(n.languages.markup.tag,"addInlined",{value:function(r,o){var i={};i["language-"+o]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:n.languages[o]},i.cdata=/^<!\[CDATA\[|\]\]>$/i;var a={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:i}};a["language-"+o]={pattern:/[\s\S]+/,inside:n.languages[o]};var l={};l[r]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return r}),"i"),lookbehind:!0,greedy:!0,inside:a},n.languages.insertBefore("markup","cdata",l)}}),Object.defineProperty(n.languages.markup.tag,"addAttribute",{value:function(r,o){n.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+r+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[o,"language-"+o],inside:n.languages[o]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),n.languages.html=n.languages.markup,n.languages.mathml=n.languages.markup,n.languages.svg=n.languages.markup,n.languages.xml=n.languages.extend("markup",{}),n.languages.ssml=n.languages.xml,n.languages.atom=n.languages.xml,n.languages.rss=n.languages.xml,function(r){var o=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;r.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+o.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+o.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+o.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+o.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:o,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},r.languages.css.atrule.inside.rest=r.languages.css;var i=r.languages.markup;i&&(i.tag.addInlined("style","css"),i.tag.addAttribute("style","css"))}(n),n.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},n.languages.javascript=n.languages.extend("clike",{"class-name":[n.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),n.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,n.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:n.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:n.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:n.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:n.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:n.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),n.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:n.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),n.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),n.languages.markup&&(n.languages.markup.tag.addInlined("script","javascript"),n.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),n.languages.js=n.languages.javascript,function(){if(typeof n>"u"||typeof document>"u")return;Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var r="Loading…",o=function(y,N){return"✖ Error "+y+" while fetching file: "+N},i="✖ Error: File does not exist or is empty",a={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},l="data-src-status",u="loading",p="loaded",m="failed",_="pre[data-src]:not(["+l+'="'+p+'"]):not(['+l+'="'+u+'"])';function v(y,N,R){var O=new XMLHttpRequest;O.open("GET",y,!0),O.onreadystatechange=function(){O.readyState==4&&(O.status<400&&O.responseText?N(O.responseText):O.status>=400?R(o(O.status,O.statusText)):R(i))},O.send(null)}function C(y){var N=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(y||"");if(N){var R=Number(N[1]),O=N[2],k=N[3];return O?k?[R,Number(k)]:[R,void 0]:[R,R]}}n.hooks.add("before-highlightall",function(y){y.selector+=", "+_}),n.hooks.add("before-sanity-check",function(y){var N=y.element;if(N.matches(_)){y.code="",N.setAttribute(l,u);var R=N.appendChild(document.createElement("CODE"));R.textContent=r;var O=N.getAttribute("data-src"),k=y.language;if(k==="none"){var I=(/\.(\w+)$/.exec(O)||[,"none"])[1];k=a[I]||I}n.util.setLanguage(R,k),n.util.setLanguage(N,k);var M=n.plugins.autoloader;M&&M.loadLanguages(k),v(O,function(Y){N.setAttribute(l,p);var ee=C(N.getAttribute("data-range"));if(ee){var re=Y.split(/\r\n?|\n/g),Z=ee[0],U=ee[1]==null?re.length:ee[1];Z<0&&(Z+=re.length),Z=Math.max(0,Math.min(Z-1,re.length)),U<0&&(U+=re.length),U=Math.max(0,Math.min(U,re.length)),Y=re.slice(Z,U).join(`
|
|
110
|
-
`),N.hasAttribute("data-start")||N.setAttribute("data-start",String(Z+1))}R.textContent=Y,n.highlightElement(R)},function(Y){N.setAttribute(l,m),R.textContent=Y})}}),n.plugins.fileHighlight={highlight:function(y){for(var N=(y||document).querySelectorAll(_),R=0,O;O=N[R++];)n.highlightElement(O)}};var b=!1;n.fileHighlight=function(){b||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),b=!0),n.plugins.fileHighlight.highlight.apply(this,arguments)}}()}(l0)),l0.exports}var dA={},u0;function nE(){return u0||(u0=1,Prism.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/}),dA}var fA={},d0;function rE(){return d0||(d0=1,Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:Prism.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),Prism.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),Prism.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),Prism.languages.markup&&(Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),Prism.languages.js=Prism.languages.javascript),fA}var hA={},f0;function oE(){return f0||(f0=1,Prism.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},Prism.languages.markup.tag.inside["attr-value"].inside.entity=Prism.languages.markup.entity,Prism.languages.markup.doctype.inside["internal-subset"].inside=Prism.languages.markup,Prism.hooks.add("wrap",function(e){e.type==="entity"&&(e.attributes.title=e.content.replace(/&/,"&"))}),Object.defineProperty(Prism.languages.markup.tag,"addInlined",{value:function(e,t){var n={};n["language-"+t]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:Prism.languages[t]},n.cdata=/^<!\[CDATA\[|\]\]>$/i;var r={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:n}};r["language-"+t]={pattern:/[\s\S]+/,inside:Prism.languages[t]};var o={};o[e]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return e}),"i"),lookbehind:!0,greedy:!0,inside:r},Prism.languages.insertBefore("markup","cdata",o)}}),Object.defineProperty(Prism.languages.markup.tag,"addAttribute",{value:function(e,t){Prism.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,"language-"+t],inside:Prism.languages[t]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),Prism.languages.html=Prism.languages.markup,Prism.languages.mathml=Prism.languages.markup,Prism.languages.svg=Prism.languages.markup,Prism.languages.xml=Prism.languages.extend("markup",{}),Prism.languages.ssml=Prism.languages.xml,Prism.languages.atom=Prism.languages.xml,Prism.languages.rss=Prism.languages.xml),hA}var pA={},h0;function iE(){return h0||(h0=1,function(e){var t=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function n(m){return m=m.replace(/<inner>/g,function(){return t}),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+m+")")}var r=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,o=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,function(){return r}),i=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;e.languages.markdown=e.languages.extend("markup",{}),e.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:e.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+o+i+"(?:"+o+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+o+i+")(?:"+o+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(r),inside:e.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+o+")"+i+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+o+"$"),inside:{"table-header":{pattern:RegExp(r),alias:"important",inside:e.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n(/\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\b|\*\*(?:(?!\*)<inner>|\*(?:(?!\*)<inner>)+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n(/\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\b|\*(?:(?!\*)<inner>|\*\*(?:(?!\*)<inner>)+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n(/(~~?)(?:(?!~)<inner>)+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:n(/!?\[(?:(?!\])<inner>)+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\])<inner>)+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach(function(m){["url","bold","italic","strike","code-snippet"].forEach(function(_){m!==_&&(e.languages.markdown[m].inside.content.inside[_]=e.languages.markdown[_])})}),e.hooks.add("after-tokenize",function(m){if(m.language!=="markdown"&&m.language!=="md")return;function _(v){if(!(!v||typeof v=="string"))for(var C=0,b=v.length;C<b;C++){var y=v[C];if(y.type!=="code"){_(y.content);continue}var N=y.content[1],R=y.content[3];if(N&&R&&N.type==="code-language"&&R.type==="code-block"&&typeof N.content=="string"){var O=N.content.replace(/\b#/g,"sharp").replace(/\b\+\+/g,"pp");O=(/[a-z][\w-]*/i.exec(O)||[""])[0].toLowerCase();var k="language-"+O;R.alias?typeof R.alias=="string"?R.alias=[R.alias,k]:R.alias.push(k):R.alias=[k]}}}_(m.tokens)}),e.hooks.add("wrap",function(m){if(m.type==="code-block"){for(var _="",v=0,C=m.classes.length;v<C;v++){var b=m.classes[v],y=/language-(.+)/.exec(b);if(y){_=y[1];break}}var N=e.languages[_];if(N)m.content=e.highlight(p(m.content),N,_);else if(_&&_!=="none"&&e.plugins.autoloader){var R="md-"+new Date().valueOf()+"-"+Math.floor(Math.random()*1e16);m.attributes.id=R,e.plugins.autoloader.loadLanguages(_,function(){var O=document.getElementById(R);O&&(O.innerHTML=e.highlight(O.textContent,e.languages[_],_))})}}});var a=RegExp(e.languages.markup.tag.pattern.source,"gi"),l={amp:"&",lt:"<",gt:">",quot:'"'},u=String.fromCodePoint||String.fromCharCode;function p(m){var _=m.replace(a,"");return _=_.replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi,function(v,C){if(C=C.toLowerCase(),C[0]==="#"){var b;return C[1]==="x"?b=parseInt(C.slice(2),16):b=Number(C.slice(1)),u(b)}else{var y=l[C];return y||v}}),_}e.languages.md=e.languages.markdown}(Prism)),pA}var gA={},p0;function aE(){return p0||(p0=1,Prism.languages.c=Prism.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/}),Prism.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}}),Prism.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},Prism.languages.c.string],char:Prism.languages.c.char,comment:Prism.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:Prism.languages.c}}}}),Prism.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/}),delete Prism.languages.c.boolean),gA}var mA={},g0;function sE(){return g0||(g0=1,function(e){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+t.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+t.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css;var n=e.languages.markup;n&&(n.tag.addInlined("style","css"),n.tag.addAttribute("style","css"))}(Prism)),mA}var vA={},m0;function lE(){return m0||(m0=1,Prism.languages.objectivec=Prism.languages.extend("c",{string:{pattern:/@?"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},keyword:/\b(?:asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|in|inline|int|long|register|return|self|short|signed|sizeof|static|struct|super|switch|typedef|typeof|union|unsigned|void|volatile|while)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,operator:/-[->]?|\+\+?|!=?|<<?=?|>>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete Prism.languages.objectivec["class-name"],Prism.languages.objc=Prism.languages.objectivec),vA}var yA={},v0;function cE(){return v0||(v0=1,Prism.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/}),yA}var bA={},y0;function uE(){return y0||(y0=1,Prism.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern://,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},Prism.languages.python["string-interpolation"].inside.interpolation.inside.rest=Prism.languages.python,Prism.languages.py=Prism.languages.python),bA}var _A={},b0;function dE(){return b0||(b0=1,function(e){for(var t=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|<self>)*\*\//.source,n=0;n<2;n++)t=t.replace(/<self>/g,function(){return t});t=t.replace(/<self>/g,function(){return/[^\s\S]/.source}),e.languages.rust={comment:[{pattern:RegExp(/(^|[^\\])/.source+t),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:!0},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:"attr-name",inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:"punctuation"},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:"symbol"},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:"punctuation"},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:"function"},"type-definition":{pattern:/(\b(?:enum|struct|trait|type|union)\s+)\w+/,lookbehind:!0,alias:"class-name"},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:"namespace"},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:"namespace",inside:{punctuation:/::/}}],keyword:[/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\b\w+!/,alias:"property"},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<<?=?|>>?=?|[@?]/},e.languages.rust["closure-params"].inside.rest=e.languages.rust,e.languages.rust.attribute.inside.string=e.languages.rust.string}(Prism)),_A}var xA={},_0;function fE(){return _0||(_0=1,Prism.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp(/(^|[^"#])/.source+"(?:"+/"(?:\\(?:\((?:[^()]|\([^()]*\))*\)|\r\n|[^(])|[^\\\r\n"])*"/.source+"|"+/"""(?:\\(?:\((?:[^()]|\([^()]*\))*\)|[^(])|[^\\"]|"(?!""))*"""/.source+")"+/(?!["#])/.source),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:"punctuation"},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp(/(^|[^"#])(#+)/.source+"(?:"+/"(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|\r\n|[^#])|[^\\\r\n])*?"/.source+"|"+/"""(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|[^#])|[^\\])*?"""/.source+")\\2"),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:"punctuation"},string:/[\s\S]+/}}],directive:{pattern:RegExp(/#/.source+"(?:"+(/(?:elseif|if)\b/.source+"(?:[ ]*"+/(?:![ \t]*)?(?:\b\w+\b(?:[ \t]*\((?:[^()]|\([^()]*\))*\))?|\((?:[^()]|\([^()]*\))*\))(?:[ \t]*(?:&&|\|\|))?/.source+")+")+"|"+/(?:else|endif)\b/.source+")"),alias:"property",inside:{"directive-name":/^#\w+/,boolean:/\b(?:false|true)\b/,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:"constant"},"other-directive":{pattern:/#\w+\b/,alias:"property"},attribute:{pattern:/@\w+/,alias:"atrule"},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:"function"},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:"important"},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:false|true)\b/,nil:{pattern:/\bnil\b/,alias:"constant"},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:"keyword"},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/},Prism.languages.swift["string-literal"].forEach(function(e){e.inside.interpolation.inside=Prism.languages.swift})),xA}var EA={},x0;function hE(){return x0||(x0=1,function(e){e.languages.typescript=e.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),e.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete e.languages.typescript.parameter,delete e.languages.typescript["literal-property"];var t=e.languages.extend("typescript",{});delete t["class-name"],e.languages.typescript["class-name"].inside=t,e.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:t}}}}),e.languages.ts=e.languages.typescript}(Prism)),EA}var CA={},E0;function pE(){return E0||(E0=1,function(e){var t=/\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record(?!\s*[(){}[\]<>=%~.:,;?+\-*/&|^])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/,n=/(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,r={pattern:RegExp(/(^|[^\w.])/.source+n+/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}},punctuation:/\./}};e.languages.java=e.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"/,lookbehind:!0,greedy:!0},"class-name":[r,{pattern:RegExp(/(^|[^\w.])/.source+n+/[A-Z]\w*(?=\s+\w+\s*[;,=()]|\s*(?:\[[\s,]*\]\s*)?::\s*new\b)/.source),lookbehind:!0,inside:r.inside},{pattern:RegExp(/(\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\s+)/.source+n+/[A-Z]\w*\b/.source),lookbehind:!0,inside:r.inside}],keyword:t,function:[e.languages.clike.function,{pattern:/(::\s*)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0},constant:/\b[A-Z][A-Z_\d]+\b/}),e.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"},char:{pattern:/'(?:\\.|[^'\\\r\n]){1,6}'/,greedy:!0}}),e.languages.insertBefore("java","class-name",{annotation:{pattern:/(^|[^.])@\w+(?:\s*\.\s*\w+)*/,lookbehind:!0,alias:"punctuation"},generics:{pattern:/<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/,inside:{"class-name":r,keyword:t,punctuation:/[<>(),.:]/,operator:/[?&|]/}},import:[{pattern:RegExp(/(\bimport\s+)/.source+n+/(?:[A-Z]\w*|\*)(?=\s*;)/.source),lookbehind:!0,inside:{namespace:r.inside.namespace,punctuation:/\./,operator:/\*/,"class-name":/\w+/}},{pattern:RegExp(/(\bimport\s+static\s+)/.source+n+/(?:\w+|\*)(?=\s*;)/.source),lookbehind:!0,alias:"static",inside:{namespace:r.inside.namespace,static:/\b\w+$/,punctuation:/\./,operator:/\*/,"class-name":/\w+/}}],namespace:{pattern:RegExp(/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)(?!<keyword>)[a-z]\w*(?:\.[a-z]\w*)*\.?/.source.replace(/<keyword>/g,function(){return t.source})),lookbehind:!0,inside:{punctuation:/\./}}})}(Prism)),CA}var wA={},C0;function gE(){return C0||(C0=1,function(e){var t=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,n=/\b(?!<keyword>)\w+(?:\s*\.\s*\w+)*\b/.source.replace(/<keyword>/g,function(){return t.source});e.languages.cpp=e.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!<keyword>)\w+/.source.replace(/<keyword>/g,function(){return t.source})),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:t,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),e.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/<mod-name>(?:\s*:\s*<mod-name>)?|:\s*<mod-name>/.source.replace(/<mod-name>/g,function(){return n})+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),e.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:e.languages.cpp}}}}),e.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),e.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:e.languages.extend("cpp",{})}}),e.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},e.languages.cpp["base-clause"])}(Prism)),wA}var w0;function NA(){if(w0)return Vn;w0=1;var e=tE();nE(),rE(),oE(),iE(),aE(),sE(),lE(),cE(),uE(),dE(),fE(),hE(),pE(),gE();var t=vn(),n=Xt();const r=le=>le!=null&&e.languages.hasOwnProperty(le)?le:void 0;function o(le,ce){for(const ve of le.childNodes){if(t.isHTMLElement(ve)&&ve.tagName===ce)return!0;o(ve,ce)}return!1}const i="data-highlight-language";class a extends n.ElementNode{static getType(){return"code"}static clone(ce){return new a(ce.__language,ce.__key)}constructor(ce,ve){super(ve),this.__language=r(ce)}createDOM(ce){const ve=document.createElement("code");t.addClassNamesToElement(ve,ce.theme.code),ve.setAttribute("spellcheck","false");const ke=this.getLanguage();return ke&&ve.setAttribute(i,ke),ve}updateDOM(ce,ve,ke){const Pe=this.__language,Fe=ce.__language;return Pe?Pe!==Fe&&ve.setAttribute(i,Pe):Fe&&ve.removeAttribute(i),!1}exportDOM(){const ce=document.createElement("pre");ce.setAttribute("spellcheck","false");const ve=this.getLanguage();return ve&&ce.setAttribute(i,ve),{element:ce}}static importDOM(){return{code:ce=>ce.textContent!=null&&(/\r?\n/.test(ce.textContent)||o(ce,"BR"))?{conversion:p,priority:1}:null,div:ce=>({conversion:m,priority:1}),pre:ce=>({conversion:p,priority:0}),table:ce=>R(ce)?{conversion:_,priority:3}:null,td:ce=>{const ve=ce,ke=ve.closest("table");return N(ve)?{conversion:C,priority:3}:ke&&R(ke)?{conversion:v,priority:3}:null},tr:ce=>{const ve=ce.closest("table");return ve&&R(ve)?{conversion:v,priority:3}:null}}}static importJSON(ce){const ve=l(ce.language);return ve.setFormat(ce.format),ve.setIndent(ce.indent),ve.setDirection(ce.direction),ve}exportJSON(){return{...super.exportJSON(),language:this.getLanguage(),type:"code",version:1}}insertNewAfter(ce,ve=!0){const ke=this.getChildren(),Pe=ke.length;if(Pe>=2&&ke[Pe-1].getTextContent()===`
|
|
111
|
-
`&&ke[Pe-2].getTextContent()===`
|
|
112
|
-
`&&ce.isCollapsed()&&ce.anchor.key===this.__key&&ce.anchor.offset===Pe){ke[Pe-1].remove(),ke[Pe-2].remove();const dt=n.$createParagraphNode();return this.insertAfter(dt,ve),dt}const{anchor:Fe,focus:Qe}=ce,st=(Fe.isBefore(Qe)?Fe:Qe).getNode();if(n.$isTextNode(st)){let dt=ge(st);const At=[];for(;;)if(n.$isTabNode(dt))At.push(n.$createTabNode()),dt=dt.getNextSibling();else if(fe(dt)){let We=0;const tt=dt.getTextContent(),ht=dt.getTextContentSize();for(;We<ht&&tt[We]===" ";We++);if(We!==0&&At.push(J(" ".repeat(We))),We!==ht)break;dt=dt.getNextSibling()}else break;const Ae=st.splitText(Fe.offset)[0],me=Fe.offset===0?0:1,_e=Ae.getIndexWithinParent()+me,De=st.getParentOrThrow(),je=[n.$createLineBreakNode(),...At];De.splice(_e,0,je);const Me=At[At.length-1];Me?Me.select():Fe.offset===0?Ae.selectPrevious():Ae.getNextSibling().selectNext(0,0)}if(u(st)){const{offset:dt}=ce.anchor;st.splice(dt,0,[n.$createLineBreakNode()]),st.select(dt+1,dt+1)}return null}canIndent(){return!1}collapseAtStart(){const ce=n.$createParagraphNode();return this.getChildren().forEach(ve=>ce.append(ve)),this.replace(ce),!0}setLanguage(ce){const ve=this.getWritable();ve.__language=r(ce)}getLanguage(){return this.getLatest().__language}}function l(le){return n.$applyNodeReplacement(new a(le))}function u(le){return le instanceof a}function p(le){let ce;return t.isHTMLElement(le)&&(ce=le.getAttribute(i)),{node:l(ce)}}function m(le){const ce=le,ve=b(ce);return!ve&&!y(ce)?{node:null}:{after:ke=>{const Pe=le.parentNode;return Pe!=null&&le!==Pe.lastChild&&ke.push(n.$createLineBreakNode()),ke},node:ve?l():null}}function _(){return{node:l()}}function v(){return{node:null}}function C(le){const ce=le;return{after:ve=>(ce.parentNode&&ce.parentNode.nextSibling&&ve.push(n.$createLineBreakNode()),ve),node:null}}function b(le){return le.style.fontFamily.match("monospace")!==null}function y(le){let ce=le.parentElement;for(;ce!==null;){if(b(ce))return!0;ce=ce.parentElement}return!1}function N(le){return le.classList.contains("js-file-line")}function R(le){return le.classList.contains("js-file-line-container")}const O="javascript",k={c:"C",clike:"C-like",cpp:"C++",css:"CSS",html:"HTML",java:"Java",js:"JavaScript",markdown:"Markdown",objc:"Objective-C",plain:"Plain Text",py:"Python",rust:"Rust",sql:"SQL",swift:"Swift",typescript:"TypeScript",xml:"XML"},I={cpp:"cpp",java:"java",javascript:"js",md:"markdown",plaintext:"plain",python:"py",text:"plain",ts:"typescript"};function M(le){return I[le]||le}function Y(le){const ce=M(le);return k[ce]||ce}const ee=()=>O,re=()=>Object.keys(e.languages).filter(le=>typeof e.languages[le]!="function").sort();class Z extends n.TextNode{constructor(ce,ve,ke){super(ce,ke),this.__highlightType=ve}static getType(){return"code-highlight"}static clone(ce){return new Z(ce.__text,ce.__highlightType||void 0,ce.__key)}getHighlightType(){return this.getLatest().__highlightType}createDOM(ce){const ve=super.createDOM(ce),ke=U(ce.theme,this.__highlightType);return t.addClassNamesToElement(ve,ke),ve}updateDOM(ce,ve,ke){const Pe=super.updateDOM(ce,ve,ke),Fe=U(ke.theme,ce.__highlightType),Qe=U(ke.theme,this.__highlightType);return Fe!==Qe&&(Fe&&t.removeClassNamesFromElement(ve,Fe),Qe&&t.addClassNamesToElement(ve,Qe)),Pe}static importJSON(ce){const ve=J(ce.text,ce.highlightType);return ve.setFormat(ce.format),ve.setDetail(ce.detail),ve.setMode(ce.mode),ve.setStyle(ce.style),ve}exportJSON(){return{...super.exportJSON(),highlightType:this.getHighlightType(),type:"code-highlight",version:1}}setFormat(ce){return this}isParentRequired(){return!0}createParentElementNode(){return l()}}function U(le,ce){return ce&&le&&le.codeHighlight&&le.codeHighlight[ce]}function J(le,ce){return n.$applyNodeReplacement(new Z(le,ce))}function fe(le){return le instanceof Z}function ge(le){let ce=le,ve=le;for(;fe(ve)||n.$isTabNode(ve);)ce=ve,ve=ve.getPreviousSibling();return ce}function te(le){let ce=le,ve=le;for(;fe(ve)||n.$isTabNode(ve);)ce=ve,ve=ve.getNextSibling();return ce}const he={defaultLanguage:O,tokenize(le,ce){return e.tokenize(le,e.languages[ce||""]||e.languages[this.defaultLanguage])}};function V(le,ce){let ve=null,ke=null,Pe=le,Fe=ce,Qe=le.getTextContent();for(;;){if(Fe===0){if(Pe=Pe.getPreviousSibling(),Pe===null)break;if(!(fe(Pe)||n.$isTabNode(Pe)||n.$isLineBreakNode(Pe)))throw Error("Expected a valid Code Node: CodeHighlightNode, TabNode, LineBreakNode");if(n.$isLineBreakNode(Pe)){ve={node:Pe,offset:1};break}Fe=Math.max(0,Pe.getTextContentSize()-1),Qe=Pe.getTextContent()}else Fe--;const dt=Qe[Fe];fe(Pe)&&dt!==" "&&(ke={node:Pe,offset:Fe})}if(ke!==null)return ke;let st=null;if(ce<le.getTextContentSize())fe(le)&&(st=le.getTextContent()[ce]);else{const dt=le.getNextSibling();fe(dt)&&(st=dt.getTextContent()[0])}if(st!==null&&st!==" ")return ve;{const dt=B(le,ce);return dt!==null?dt:ve}}function B(le,ce){let ve=le,ke=ce,Pe=le.getTextContent(),Fe=le.getTextContentSize();for(;;){if(!fe(ve)||ke===Fe){if(ve=ve.getNextSibling(),ve===null||n.$isLineBreakNode(ve))return null;fe(ve)&&(ke=0,Pe=ve.getTextContent(),Fe=ve.getTextContentSize())}if(fe(ve)){if(Pe[ke]!==" ")return{node:ve,offset:ke};ke++}}}function q(le){const ce=te(le);if(n.$isLineBreakNode(ce))throw Error("Unexpected lineBreakNode in getEndOfCodeInLine");return ce}function ie(le,ce,ve){const ke=le.getParent();u(ke)?Q(ke,ce,ve):fe(le)&&le.replace(n.$createTextNode(le.__text))}function H(le,ce){const ve=ce.getElementByKey(le.getKey());if(ve===null)return;const ke=le.getChildren(),Pe=ke.length;if(Pe===ve.__cachedChildrenLength)return;ve.__cachedChildrenLength=Pe;let Fe="1",Qe=1;for(let st=0;st<Pe;st++)n.$isLineBreakNode(ke[st])&&(Fe+=`
|
|
113
|
-
`+ ++Qe);ve.setAttribute("data-gutter",Fe)}const j=new Set;function Q(le,ce,ve){const ke=le.getKey();j.has(ke)||(j.add(ke),le.getLanguage()===void 0&&le.setLanguage(ve.defaultLanguage),ce.update(()=>{w(ke,()=>{const Pe=n.$getNodeByKey(ke);if(!u(Pe)||!Pe.isAttached())return!1;const Fe=Pe.getTextContent(),Qe=ve.tokenize(Fe,Pe.getLanguage()||ve.defaultLanguage),st=F(Qe),dt=T(Pe.getChildren(),st),{from:At,to:Ae,nodesForReplacement:me}=dt;return At!==Ae||me.length?(le.splice(At,Ae-At,me),!0):!1})},{onUpdate:()=>{j.delete(ke)},skipTransforms:!0}))}function F(le,ce){const ve=[];for(const ke of le)if(typeof ke=="string"){const Pe=ke.split(/(\n|\t)/),Fe=Pe.length;for(let Qe=0;Qe<Fe;Qe++){const st=Pe[Qe];st===`
|
|
114
|
-
`||st===`\r
|
|
115
|
-
`?ve.push(n.$createLineBreakNode()):st===" "?ve.push(n.$createTabNode()):st.length>0&&ve.push(J(st,ce))}}else{const{content:Pe}=ke;typeof Pe=="string"?ve.push(...F([Pe],ke.type)):Array.isArray(Pe)&&ve.push(...F(Pe,ke.type))}return ve}function w(le,ce){const ve=n.$getNodeByKey(le);if(!u(ve)||!ve.isAttached())return;const ke=n.$getSelection();if(!n.$isRangeSelection(ke)){ce();return}const Pe=ke.anchor,Fe=Pe.offset,Qe=Pe.type==="element"&&n.$isLineBreakNode(ve.getChildAtIndex(Pe.offset-1));let st=0;if(!Qe){const dt=Pe.getNode();st=Fe+dt.getPreviousSiblings().reduce((At,Ae)=>At+Ae.getTextContentSize(),0)}if(ce()){if(Qe){Pe.getNode().select(Fe,Fe);return}ve.getChildren().some(dt=>{const At=n.$isTextNode(dt);if(At||n.$isLineBreakNode(dt)){const Ae=dt.getTextContentSize();if(At&&Ae>=st)return dt.select(st,st),!0;st-=Ae}return!1})}}function T(le,ce){let ve=0;for(;ve<le.length&&P(le[ve],ce[ve]);)ve++;const ke=le.length,Pe=ce.length,Fe=Math.min(ke,Pe)-ve;let Qe=0;for(;Qe<Fe;)if(Qe++,!P(le[ke-Qe],ce[Pe-Qe])){Qe--;break}const st=ve,dt=ke-Qe,At=ce.slice(ve,Pe-Qe);return{from:st,nodesForReplacement:At,to:dt}}function P(le,ce){return fe(le)&&fe(ce)&&le.__text===ce.__text&&le.__highlightType===ce.__highlightType||n.$isTabNode(le)&&n.$isTabNode(ce)||n.$isLineBreakNode(le)&&n.$isLineBreakNode(ce)}function X(le){if(!n.$isRangeSelection(le))return!1;const ce=le.anchor.getNode(),ve=le.focus.getNode();if(ce.is(ve)&&u(ce))return!0;const ke=ce.getParent();return u(ke)&&ke.is(ve.getParent())}function ue(le){const ce=le.getNodes(),ve=[[]];if(ce.length===1&&u(ce[0]))return ve;let ke=ve[0];for(let Pe=0;Pe<ce.length;Pe++){const Fe=ce[Pe];if(!(fe(Fe)||n.$isTabNode(Fe)||n.$isLineBreakNode(Fe)))throw Error("Expected selection to be inside CodeBlock and consisting of CodeHighlightNode, TabNode and LineBreakNode");n.$isLineBreakNode(Fe)?Pe!==0&&ke.length>0&&(ke=[],ve.push(ke)):ke.push(Fe)}return ve}function pe(le){const ce=n.$getSelection();if(!n.$isRangeSelection(ce)||!X(ce))return null;const ve=le?n.OUTDENT_CONTENT_COMMAND:n.INDENT_CONTENT_COMMAND,ke=le?n.OUTDENT_CONTENT_COMMAND:n.INSERT_TAB_COMMAND;if(ue(ce).length>1)return ve;const Pe=ce.getNodes()[0];if(!(u(Pe)||fe(Pe)||n.$isTabNode(Pe)||n.$isLineBreakNode(Pe)))throw Error("Expected selection firstNode to be CodeHighlightNode or TabNode");if(u(Pe))return ve;const Fe=ge(Pe),Qe=te(Pe),st=ce.anchor,dt=ce.focus;let At,Ae;return dt.isBefore(st)?(At=dt,Ae=st):(At=st,Ae=dt),Fe!==null&&Qe!==null&&At.key===Fe.getKey()&&At.offset===0&&Ae.key===Qe.getKey()&&Ae.offset===Qe.getTextContentSize()?ve:ke}function se(le){const ce=n.$getSelection();if(!n.$isRangeSelection(ce)||!X(ce))return!1;const ve=ue(ce),ke=ve.length;if(ve.length>1){for(let Qe=0;Qe<ke;Qe++){const st=ve[Qe];if(st.length>0){let dt=st[0];Qe===0&&(dt=ge(dt)),dt!==null&&(le===n.INDENT_CONTENT_COMMAND?dt.insertBefore(n.$createTabNode()):n.$isTabNode(dt)&&dt.remove())}}return!0}const Pe=ce.getNodes()[0];if(!(u(Pe)||fe(Pe)||n.$isTabNode(Pe)||n.$isLineBreakNode(Pe)))throw Error("Expected selection firstNode to be CodeHighlightNode or CodeTabNode");if(u(Pe))return le===n.INDENT_CONTENT_COMMAND&&ce.insertNodes([n.$createTabNode()]),!0;const Fe=ge(Pe);if(Fe===null)throw Error("Expected getFirstCodeNodeOfLine to return a valid Code Node");return le===n.INDENT_CONTENT_COMMAND?n.$isLineBreakNode(Fe)?Fe.insertAfter(n.$createTabNode()):Fe.insertBefore(n.$createTabNode()):n.$isTabNode(Fe)&&Fe.remove(),!0}function Ce(le,ce){const ve=n.$getSelection();if(!n.$isRangeSelection(ve))return!1;const{anchor:ke,focus:Pe}=ve,Fe=ke.offset,Qe=Pe.offset,st=ke.getNode(),dt=Pe.getNode(),At=le===n.KEY_ARROW_UP_COMMAND;if(!X(ve)||!(fe(st)||n.$isTabNode(st))||!(fe(dt)||n.$isTabNode(dt)))return!1;if(!ce.altKey){if(ve.isCollapsed()){const tt=st.getParentOrThrow();if(At&&Fe===0&&st.getPreviousSibling()===null){if(tt.getPreviousSibling()===null)return tt.selectPrevious(),ce.preventDefault(),!0}else if(!At&&Fe===st.getTextContentSize()&&st.getNextSibling()===null&&tt.getNextSibling()===null)return tt.selectNext(),ce.preventDefault(),!0}return!1}let Ae,me;if(st.isBefore(dt)?(Ae=ge(st),me=te(dt)):(Ae=ge(dt),me=te(st)),Ae==null||me==null)return!1;const _e=Ae.getNodesBetween(me);for(let tt=0;tt<_e.length;tt++){const ht=_e[tt];if(!fe(ht)&&!n.$isTabNode(ht)&&!n.$isLineBreakNode(ht))return!1}ce.preventDefault(),ce.stopPropagation();const De=At?Ae.getPreviousSibling():me.getNextSibling();if(!n.$isLineBreakNode(De))return!0;const je=At?De.getPreviousSibling():De.getNextSibling();if(je==null)return!0;let We=(fe(je)||n.$isTabNode(je)||n.$isLineBreakNode(je)?At?ge(je):te(je):null)??je;return De.remove(),_e.forEach(tt=>tt.remove()),le===n.KEY_ARROW_UP_COMMAND?(_e.forEach(tt=>We.insertBefore(tt)),We.insertBefore(De)):(We.insertAfter(De),We=De,_e.forEach(tt=>{We.insertAfter(tt),We=tt})),ve.setTextNodeRange(st,Fe,dt,Qe),!0}function Se(le,ce){const ve=n.$getSelection();if(!n.$isRangeSelection(ve))return!1;const{anchor:ke,focus:Pe}=ve,Fe=ke.getNode(),Qe=Pe.getNode(),st=le===n.MOVE_TO_START;if(!(fe(Fe)||n.$isTabNode(Fe))||!(fe(Qe)||n.$isTabNode(Qe)))return!1;if(st){const dt=V(Qe,Pe.offset);if(dt!==null){const{node:At,offset:Ae}=dt;n.$isLineBreakNode(At)?At.selectNext(0,0):ve.setTextNodeRange(At,Ae,At,Ae)}else Qe.getParentOrThrow().selectStart()}else q(Qe).select();return ce.preventDefault(),ce.stopPropagation(),!0}function He(le,ce){if(!le.hasNodes([a,Z]))throw new Error("CodeHighlightPlugin: CodeNode or CodeHighlightNode not registered on editor");return ce==null&&(ce=he),t.mergeRegister(le.registerMutationListener(a,ve=>{le.update(()=>{for(const[ke,Pe]of ve)if(Pe!=="destroyed"){const Fe=n.$getNodeByKey(ke);Fe!==null&&H(Fe,le)}})}),le.registerNodeTransform(a,ve=>Q(ve,le,ce)),le.registerNodeTransform(n.TextNode,ve=>ie(ve,le,ce)),le.registerNodeTransform(Z,ve=>ie(ve,le,ce)),le.registerCommand(n.KEY_TAB_COMMAND,ve=>{const ke=pe(ve.shiftKey);return ke===null?!1:(ve.preventDefault(),le.dispatchCommand(ke,void 0),!0)},n.COMMAND_PRIORITY_LOW),le.registerCommand(n.INSERT_TAB_COMMAND,()=>{const ve=n.$getSelection();return X(ve)?(n.$insertNodes([n.$createTabNode()]),!0):!1},n.COMMAND_PRIORITY_LOW),le.registerCommand(n.INDENT_CONTENT_COMMAND,ve=>se(n.INDENT_CONTENT_COMMAND),n.COMMAND_PRIORITY_LOW),le.registerCommand(n.OUTDENT_CONTENT_COMMAND,ve=>se(n.OUTDENT_CONTENT_COMMAND),n.COMMAND_PRIORITY_LOW),le.registerCommand(n.KEY_ARROW_UP_COMMAND,ve=>Ce(n.KEY_ARROW_UP_COMMAND,ve),n.COMMAND_PRIORITY_LOW),le.registerCommand(n.KEY_ARROW_DOWN_COMMAND,ve=>Ce(n.KEY_ARROW_DOWN_COMMAND,ve),n.COMMAND_PRIORITY_LOW),le.registerCommand(n.MOVE_TO_END,ve=>Se(n.MOVE_TO_END,ve),n.COMMAND_PRIORITY_LOW),le.registerCommand(n.MOVE_TO_START,ve=>Se(n.MOVE_TO_START,ve),n.COMMAND_PRIORITY_LOW))}return Vn.$createCodeHighlightNode=J,Vn.$createCodeNode=l,Vn.$isCodeHighlightNode=fe,Vn.$isCodeNode=u,Vn.CODE_LANGUAGE_FRIENDLY_NAME_MAP=k,Vn.CODE_LANGUAGE_MAP=I,Vn.CodeHighlightNode=Z,Vn.CodeNode=a,Vn.DEFAULT_CODE_LANGUAGE=O,Vn.PrismTokenizer=he,Vn.getCodeLanguages=re,Vn.getDefaultCodeLanguage=ee,Vn.getEndOfCodeInLine=q,Vn.getFirstCodeNodeOfLine=ge,Vn.getLanguageFriendlyName=Y,Vn.getLastCodeNodeOfLine=te,Vn.getStartOfCodeInLine=V,Vn.normalizeCodeLang=M,Vn.registerCodeHighlighting=He,Vn}var Yn={},N0;function TA(){if(N0)return Yn;N0=1;var e=tE();nE(),rE(),oE(),iE(),aE(),sE(),lE(),cE(),uE(),dE(),fE(),hE(),pE(),gE();var t=vn(),n=Xt();let r=F=>F!=null&&e.languages.hasOwnProperty(F)?F:void 0;function o(F,w){for(let T of F.childNodes){if(t.isHTMLElement(T)&&T.tagName===w)return!0;o(T,w)}return!1}class i extends n.ElementNode{static getType(){return"code"}static clone(w){return new i(w.__language,w.__key)}constructor(w,T){super(T),this.__language=r(w)}createDOM(w){let T=document.createElement("code");return t.addClassNamesToElement(T,w.theme.code),T.setAttribute("spellcheck","false"),(w=this.getLanguage())&&T.setAttribute("data-highlight-language",w),T}updateDOM(w,T){let P=this.__language;return w=w.__language,P?P!==w&&T.setAttribute("data-highlight-language",P):w&&T.removeAttribute("data-highlight-language"),!1}exportDOM(){let w=document.createElement("pre");w.setAttribute("spellcheck","false");let T=this.getLanguage();return T&&w.setAttribute("data-highlight-language",T),{element:w}}static importDOM(){return{code:w=>w.textContent!=null&&(/\r?\n/.test(w.textContent)||o(w,"BR"))?{conversion:u,priority:1}:null,div:()=>({conversion:p,priority:1}),pre:()=>({conversion:u,priority:0}),table:w=>b(w)?{conversion:m,priority:3}:null,td:w=>{let T=w.closest("table");return w.classList.contains("js-file-line")?{conversion:v,priority:3}:T&&b(T)?{conversion:_,priority:3}:null},tr:w=>(w=w.closest("table"))&&b(w)?{conversion:_,priority:3}:null}}static importJSON(w){let T=a(w.language);return T.setFormat(w.format),T.setIndent(w.indent),T.setDirection(w.direction),T}exportJSON(){return{...super.exportJSON(),language:this.getLanguage(),type:"code",version:1}}insertNewAfter(w,T=!0){var P=this.getChildren(),X=P.length;if(2<=X&&P[X-1].getTextContent()===`
|
|
116
|
-
`&&P[X-2].getTextContent()===`
|
|
117
|
-
`&&w.isCollapsed()&&w.anchor.key===this.__key&&w.anchor.offset===X)return P[X-1].remove(),P[X-2].remove(),w=n.$createParagraphNode(),this.insertAfter(w,T),w;let{anchor:ue,focus:pe}=w;if(T=(ue.isBefore(pe)?ue:pe).getNode(),n.$isTextNode(T)){for(X=Y(T),P=[];;)if(n.$isTabNode(X))P.push(n.$createTabNode()),X=X.getNextSibling();else if(M(X)){for(var se=0,Ce=X.getTextContent(),Se=X.getTextContentSize();se<Se&&Ce[se]===" ";se++);if(se!==0&&P.push(I(" ".repeat(se))),se!==Se)break;X=X.getNextSibling()}else break;X=T.splitText(ue.offset)[0],se=ue.offset===0?0:1,se=X.getIndexWithinParent()+se,Ce=T.getParentOrThrow(),Se=[n.$createLineBreakNode(),...P],Ce.splice(se,0,Se),(P=P[P.length-1])?P.select():ue.offset===0?X.selectPrevious():X.getNextSibling().selectNext(0,0)}return l(T)&&({offset:w}=w.anchor,T.splice(w,0,[n.$createLineBreakNode()]),T.select(w+1,w+1)),null}canIndent(){return!1}collapseAtStart(){let w=n.$createParagraphNode();return this.getChildren().forEach(T=>w.append(T)),this.replace(w),!0}setLanguage(w){this.getWritable().__language=r(w)}getLanguage(){return this.getLatest().__language}}function a(F){return n.$applyNodeReplacement(new i(F))}function l(F){return F instanceof i}function u(F){let w;return t.isHTMLElement(F)&&(w=F.getAttribute("data-highlight-language")),{node:a(w)}}function p(F){let w=F.style.fontFamily.match("monospace")!==null;return w||C(F)?{after:T=>{let P=F.parentNode;return P!=null&&F!==P.lastChild&&T.push(n.$createLineBreakNode()),T},node:w?a():null}:{node:null}}function m(){return{node:a()}}function _(){return{node:null}}function v(F){return{after:w=>(F.parentNode&&F.parentNode.nextSibling&&w.push(n.$createLineBreakNode()),w),node:null}}function C(F){for(F=F.parentElement;F!==null;){if(F.style.fontFamily.match("monospace")!==null)return!0;F=F.parentElement}return!1}function b(F){return F.classList.contains("js-file-line-container")}let y={c:"C",clike:"C-like",cpp:"C++",css:"CSS",html:"HTML",java:"Java",js:"JavaScript",markdown:"Markdown",objc:"Objective-C",plain:"Plain Text",py:"Python",rust:"Rust",sql:"SQL",swift:"Swift",typescript:"TypeScript",xml:"XML"},N={cpp:"cpp",java:"java",javascript:"js",md:"markdown",plaintext:"plain",python:"py",text:"plain",ts:"typescript"};function R(F){return N[F]||F}class O extends n.TextNode{constructor(w,T,P){super(w,P),this.__highlightType=T}static getType(){return"code-highlight"}static clone(w){return new O(w.__text,w.__highlightType||void 0,w.__key)}getHighlightType(){return this.getLatest().__highlightType}createDOM(w){let T=super.createDOM(w);return w=k(w.theme,this.__highlightType),t.addClassNamesToElement(T,w),T}updateDOM(w,T,P){let X=super.updateDOM(w,T,P);return w=k(P.theme,w.__highlightType),P=k(P.theme,this.__highlightType),w!==P&&(w&&t.removeClassNamesFromElement(T,w),P&&t.addClassNamesToElement(T,P)),X}static importJSON(w){let T=I(w.text,w.highlightType);return T.setFormat(w.format),T.setDetail(w.detail),T.setMode(w.mode),T.setStyle(w.style),T}exportJSON(){return{...super.exportJSON(),highlightType:this.getHighlightType(),type:"code-highlight",version:1}}setFormat(){return this}isParentRequired(){return!0}createParentElementNode(){return a()}}function k(F,w){return w&&F&&F.codeHighlight&&F.codeHighlight[w]}function I(F,w){return n.$applyNodeReplacement(new O(F,w))}function M(F){return F instanceof O}function Y(F){let w=F;for(;M(F)||n.$isTabNode(F);)w=F,F=F.getPreviousSibling();return w}function ee(F){let w=F;for(;M(F)||n.$isTabNode(F);)w=F,F=F.getNextSibling();return w}let re={defaultLanguage:"javascript",tokenize(F,w){return e.tokenize(F,e.languages[w||""]||e.languages[this.defaultLanguage])}};function Z(F,w){let T=null;var P=null,X=F;let ue=w,pe=F.getTextContent();for(;;){if(ue===0){if(X=X.getPreviousSibling(),X===null)break;if(!(M(X)||n.$isTabNode(X)||n.$isLineBreakNode(X)))throw Error("Expected a valid Code Node: CodeHighlightNode, TabNode, LineBreakNode");if(n.$isLineBreakNode(X)){T={node:X,offset:1};break}ue=Math.max(0,X.getTextContentSize()-1),pe=X.getTextContent()}else ue--;let se=pe[ue];M(X)&&se!==" "&&(P={node:X,offset:ue})}if(P!==null)return P;if(P=null,w<F.getTextContentSize()?M(F)&&(P=F.getTextContent()[w]):(X=F.getNextSibling(),M(X)&&(P=X.getTextContent()[0])),P!==null&&P!==" ")return T;e:for(P=F,X=F.getTextContent(),F=F.getTextContentSize();;){if(!M(P)||w===F){if(P=P.getNextSibling(),P===null||n.$isLineBreakNode(P)){F=null;break e}M(P)&&(w=0,X=P.getTextContent(),F=P.getTextContentSize())}if(M(P)){if(X[w]!==" "){F={node:P,offset:w};break e}w++}}return F!==null?F:T}function U(F){if(F=ee(F),n.$isLineBreakNode(F))throw Error("Unexpected lineBreakNode in getEndOfCodeInLine");return F}function J(F,w,T){let P=F.getParent();l(P)?ge(P,w,T):M(F)&&F.replace(n.$createTextNode(F.__text))}let fe=new Set;function ge(F,w,T){let P=F.getKey();fe.has(P)||(fe.add(P),F.getLanguage()===void 0&&F.setLanguage(T.defaultLanguage),w.update(()=>{he(P,()=>{var X=n.$getNodeByKey(P);if(!l(X)||!X.isAttached())return!1;var ue=X.getTextContent();ue=T.tokenize(ue,X.getLanguage()||T.defaultLanguage),ue=te(ue);var pe=X.getChildren();for(X=0;X<pe.length&&V(pe[X],ue[X]);)X++;var se=pe.length;let Ce=ue.length,Se=Math.min(se,Ce)-X,He=0;for(;He<Se;)if(He++,!V(pe[se-He],ue[Ce-He])){He--;break}pe=X,se-=He,ue=ue.slice(X,Ce-He);let{from:le,to:ce,nodesForReplacement:ve}={from:pe,nodesForReplacement:ue,to:se};return le!==ce||ve.length?(F.splice(le,ce-le,ve),!0):!1})},{onUpdate:()=>{fe.delete(P)},skipTransforms:!0}))}function te(F,w){let T=[];for(let P of F)if(typeof P=="string"){F=P.split(/(\n|\t)/);let X=F.length;for(let ue=0;ue<X;ue++){let pe=F[ue];pe===`
|
|
118
|
-
`||pe===`\r
|
|
119
|
-
`?T.push(n.$createLineBreakNode()):pe===" "?T.push(n.$createTabNode()):0<pe.length&&T.push(I(pe,w))}}else({content:F}=P),typeof F=="string"?T.push(...te([F],P.type)):Array.isArray(F)&&T.push(...te(F,P.type));return T}function he(F,w){if(F=n.$getNodeByKey(F),l(F)&&F.isAttached()){var T=n.$getSelection();if(n.$isRangeSelection(T)){T=T.anchor;var P=T.offset,X=T.type==="element"&&n.$isLineBreakNode(F.getChildAtIndex(T.offset-1)),ue=0;if(!X){let pe=T.getNode();ue=P+pe.getPreviousSiblings().reduce((se,Ce)=>se+Ce.getTextContentSize(),0)}w()&&(X?T.getNode().select(P,P):F.getChildren().some(pe=>{let se=n.$isTextNode(pe);if(se||n.$isLineBreakNode(pe)){let Ce=pe.getTextContentSize();if(se&&Ce>=ue)return pe.select(ue,ue),!0;ue-=Ce}return!1}))}else w()}}function V(F,w){return M(F)&&M(w)&&F.__text===w.__text&&F.__highlightType===w.__highlightType||n.$isTabNode(F)&&n.$isTabNode(w)||n.$isLineBreakNode(F)&&n.$isLineBreakNode(w)}function B(F){if(!n.$isRangeSelection(F))return!1;var w=F.anchor.getNode();return F=F.focus.getNode(),w.is(F)&&l(w)?!0:(w=w.getParent(),l(w)&&w.is(F.getParent()))}function q(F){F=F.getNodes();let w=[[]];if(F.length===1&&l(F[0]))return w;let T=w[0];for(let P=0;P<F.length;P++){let X=F[P];if(!(M(X)||n.$isTabNode(X)||n.$isLineBreakNode(X)))throw Error("Expected selection to be inside CodeBlock and consisting of CodeHighlightNode, TabNode and LineBreakNode");n.$isLineBreakNode(X)?P!==0&&0<T.length&&(T=[],w.push(T)):T.push(X)}return w}function ie(F){var w=n.$getSelection();if(!n.$isRangeSelection(w)||!B(w))return null;let T=F?n.OUTDENT_CONTENT_COMMAND:n.INDENT_CONTENT_COMMAND;if(F=F?n.OUTDENT_CONTENT_COMMAND:n.INSERT_TAB_COMMAND,1<q(w).length)return T;var P=w.getNodes()[0];if(!(l(P)||M(P)||n.$isTabNode(P)||n.$isLineBreakNode(P)))throw Error("Expected selection firstNode to be CodeHighlightNode or TabNode");if(l(P))return T;let X=Y(P);P=ee(P);var ue=w.anchor;let pe=w.focus;return pe.isBefore(ue)?w=pe:(w=ue,ue=pe),X!==null&&P!==null&&w.key===X.getKey()&&w.offset===0&&ue.key===P.getKey()&&ue.offset===P.getTextContentSize()?T:F}function H(F){var w=n.$getSelection();if(!n.$isRangeSelection(w)||!B(w))return!1;var T=q(w);let P=T.length;if(1<T.length){for(w=0;w<P;w++){var X=T[w];0<X.length&&(X=X[0],w===0&&(X=Y(X)),X!==null&&(F===n.INDENT_CONTENT_COMMAND?X.insertBefore(n.$createTabNode()):n.$isTabNode(X)&&X.remove()))}return!0}if(T=w.getNodes()[0],!(l(T)||M(T)||n.$isTabNode(T)||n.$isLineBreakNode(T)))throw Error("Expected selection firstNode to be CodeHighlightNode or CodeTabNode");if(l(T))return F===n.INDENT_CONTENT_COMMAND&&w.insertNodes([n.$createTabNode()]),!0;if(T=Y(T),T===null)throw Error("Expected getFirstCodeNodeOfLine to return a valid Code Node");return F===n.INDENT_CONTENT_COMMAND?n.$isLineBreakNode(T)?T.insertAfter(n.$createTabNode()):T.insertBefore(n.$createTabNode()):n.$isTabNode(T)&&T.remove(),!0}function j(F,w){let T=n.$getSelection();if(!n.$isRangeSelection(T))return!1;let{anchor:P,focus:X}=T,ue=P.offset,pe=X.offset,se=P.getNode(),Ce=X.getNode();var Se=F===n.KEY_ARROW_UP_COMMAND;if(!B(T)||!M(se)&&!n.$isTabNode(se)||!M(Ce)&&!n.$isTabNode(Ce))return!1;if(!w.altKey){if(T.isCollapsed()){if(F=se.getParentOrThrow(),Se&&ue===0&&se.getPreviousSibling()===null){if(F.getPreviousSibling()===null)return F.selectPrevious(),w.preventDefault(),!0}else if(!Se&&ue===se.getTextContentSize()&&se.getNextSibling()===null&&F.getNextSibling()===null)return F.selectNext(),w.preventDefault(),!0}return!1}let He;if(se.isBefore(Ce)){var le=Y(se);He=ee(Ce)}else le=Y(Ce),He=ee(se);if(le==null||He==null)return!1;let ce=le.getNodesBetween(He);for(let ke=0;ke<ce.length;ke++){let Pe=ce[ke];if(!M(Pe)&&!n.$isTabNode(Pe)&&!n.$isLineBreakNode(Pe))return!1}if(w.preventDefault(),w.stopPropagation(),w=Se?le.getPreviousSibling():He.getNextSibling(),!n.$isLineBreakNode(w)||(le=Se?w.getPreviousSibling():w.getNextSibling(),le==null))return!0;Se=M(le)||n.$isTabNode(le)||n.$isLineBreakNode(le)?Se?Y(le):ee(le):null;let ve=Se??le;return w.remove(),ce.forEach(ke=>ke.remove()),F===n.KEY_ARROW_UP_COMMAND?(ce.forEach(ke=>ve.insertBefore(ke)),ve.insertBefore(w)):(ve.insertAfter(w),ve=w,ce.forEach(ke=>{ve.insertAfter(ke),ve=ke})),T.setTextNodeRange(se,ue,Ce,pe),!0}function Q(F,w){let T=n.$getSelection();if(!n.$isRangeSelection(T))return!1;let{anchor:P,focus:X}=T;var ue=P.getNode();let pe=X.getNode();if(F=F===n.MOVE_TO_START,!M(ue)&&!n.$isTabNode(ue)||!M(pe)&&!n.$isTabNode(pe))return!1;if(F)if(ue=Z(pe,X.offset),ue!==null){let{node:se,offset:Ce}=ue;n.$isLineBreakNode(se)?se.selectNext(0,0):T.setTextNodeRange(se,Ce,se,Ce)}else pe.getParentOrThrow().selectStart();else U(pe).select();return w.preventDefault(),w.stopPropagation(),!0}return Yn.$createCodeHighlightNode=I,Yn.$createCodeNode=a,Yn.$isCodeHighlightNode=M,Yn.$isCodeNode=l,Yn.CODE_LANGUAGE_FRIENDLY_NAME_MAP=y,Yn.CODE_LANGUAGE_MAP=N,Yn.CodeHighlightNode=O,Yn.CodeNode=i,Yn.DEFAULT_CODE_LANGUAGE="javascript",Yn.PrismTokenizer=re,Yn.getCodeLanguages=()=>Object.keys(e.languages).filter(F=>typeof e.languages[F]!="function").sort(),Yn.getDefaultCodeLanguage=()=>"javascript",Yn.getEndOfCodeInLine=U,Yn.getFirstCodeNodeOfLine=Y,Yn.getLanguageFriendlyName=function(F){return F=R(F),y[F]||F},Yn.getLastCodeNodeOfLine=ee,Yn.getStartOfCodeInLine=Z,Yn.normalizeCodeLang=R,Yn.registerCodeHighlighting=function(F,w){if(!F.hasNodes([i,O]))throw Error("CodeHighlightPlugin: CodeNode or CodeHighlightNode not registered on editor");return w==null&&(w=re),t.mergeRegister(F.registerMutationListener(i,T=>{F.update(()=>{for(let[ue,pe]of T)if(pe!=="destroyed"){var P=n.$getNodeByKey(ue);if(P!==null)e:{var X=P;if(P=F.getElementByKey(X.getKey()),P===null)break e;X=X.getChildren();let se=X.length;if(se===P.__cachedChildrenLength)break e;P.__cachedChildrenLength=se;let Ce="1",Se=1;for(let He=0;He<se;He++)n.$isLineBreakNode(X[He])&&(Ce+=`
|
|
120
|
-
`+ ++Se);P.setAttribute("data-gutter",Ce)}}})}),F.registerNodeTransform(i,T=>ge(T,F,w)),F.registerNodeTransform(n.TextNode,T=>J(T,F,w)),F.registerNodeTransform(O,T=>J(T,F,w)),F.registerCommand(n.KEY_TAB_COMMAND,T=>{let P=ie(T.shiftKey);return P===null?!1:(T.preventDefault(),F.dispatchCommand(P,void 0),!0)},n.COMMAND_PRIORITY_LOW),F.registerCommand(n.INSERT_TAB_COMMAND,()=>{let T=n.$getSelection();return B(T)?(n.$insertNodes([n.$createTabNode()]),!0):!1},n.COMMAND_PRIORITY_LOW),F.registerCommand(n.INDENT_CONTENT_COMMAND,()=>H(n.INDENT_CONTENT_COMMAND),n.COMMAND_PRIORITY_LOW),F.registerCommand(n.OUTDENT_CONTENT_COMMAND,()=>H(n.OUTDENT_CONTENT_COMMAND),n.COMMAND_PRIORITY_LOW),F.registerCommand(n.KEY_ARROW_UP_COMMAND,T=>j(n.KEY_ARROW_UP_COMMAND,T),n.COMMAND_PRIORITY_LOW),F.registerCommand(n.KEY_ARROW_DOWN_COMMAND,T=>j(n.KEY_ARROW_DOWN_COMMAND,T),n.COMMAND_PRIORITY_LOW),F.registerCommand(n.MOVE_TO_END,T=>Q(n.MOVE_TO_END,T),n.COMMAND_PRIORITY_LOW),F.registerCommand(n.MOVE_TO_START,T=>Q(n.MOVE_TO_START,T),n.COMMAND_PRIORITY_LOW))},Yn}process.env.NODE_ENV==="development"?NA():TA();ur();vn();var Pg=Xt();function SA({src:e,altText:t,width:n,height:r,maxWidth:o}){const i=z.useMemo(()=>({height:r,width:n,maxWidth:o}),[r,n,o]);return an.jsx("img",{src:e,alt:t,style:i})}function OA({altText:e,height:t,maxWidth:n=500,src:r,width:o,key:i}){return Pg.$applyNodeReplacement(new Ig(r,e,n,o,t,i))}class Ig extends Pg.DecoratorNode{constructor(t,n,r,o,i,a){super(a),oo(this,"__src"),oo(this,"__altText"),oo(this,"__width"),oo(this,"__height"),oo(this,"__maxWidth"),this.__src=t,this.__altText=n,this.__maxWidth=r,this.__width=o||"inherit",this.__height=i||"inherit"}static getType(){return"image"}static clone(t){return new Ig(t.__src,t.__altText,t.__maxWidth,t.__width,t.__height,t.__key)}getSrc(){return this.getLatest().__src}getAltText(){return this.getLatest().__altText}exportJSON(){return{altText:this.getAltText(),height:this.__height==="inherit"?0:this.__height,maxWidth:this.__maxWidth,src:this.getSrc(),type:"image",version:1,width:this.__width==="inherit"?0:this.__width}}static importJSON(t){return OA(t)}createDOM(t){const n=document.createElement("span"),r=t.theme.image;return r&&(n.className=r),n}updateDOM(){return!1}decorate(){return an.jsx(SA,{src:this.__src,altText:this.__altText,width:this.__width,height:this.__height,maxWidth:this.__maxWidth})}}Pg.createCommand("INSERT_IMAGE_COMMAND");Dg();kg();Mg();$g();var ru={},T0;function AA(){if(T0)return ru;T0=1;var e=vn(),t=Xt();class n extends t.TextNode{static getType(){return"hashtag"}static clone(a){return new n(a.__text,a.__key)}constructor(a,l){super(a,l)}createDOM(a){const l=super.createDOM(a);return e.addClassNamesToElement(l,a.theme.hashtag),l}static importJSON(a){const l=r(a.text);return l.setFormat(a.format),l.setDetail(a.detail),l.setMode(a.mode),l.setStyle(a.style),l}exportJSON(){return{...super.exportJSON(),type:"hashtag"}}canInsertTextBefore(){return!1}isTextEntity(){return!0}}function r(i=""){return t.$applyNodeReplacement(new n(i))}function o(i){return i instanceof n}return ru.$createHashtagNode=r,ru.$isHashtagNode=o,ru.HashtagNode=n,ru}var ou={},S0;function RA(){if(S0)return ou;S0=1;var e=vn(),t=Xt();class n extends t.TextNode{static getType(){return"hashtag"}static clone(i){return new n(i.__text,i.__key)}constructor(i,a){super(i,a)}createDOM(i){let a=super.createDOM(i);return e.addClassNamesToElement(a,i.theme.hashtag),a}static importJSON(i){let a=r(i.text);return a.setFormat(i.format),a.setDetail(i.detail),a.setMode(i.mode),a.setStyle(i.style),a}exportJSON(){return{...super.exportJSON(),type:"hashtag"}}canInsertTextBefore(){return!1}isTextEntity(){return!0}}function r(o=""){return t.$applyNodeReplacement(new n(o))}return ou.$createHashtagNode=r,ou.$isHashtagNode=function(o){return o instanceof n},ou.HashtagNode=n,ou}process.env.NODE_ENV==="development"?AA():RA();var hl={},Yh={},O0;function $A(){if(O0)return Yh;O0=1;var e=ur(),t=Xt(),n=z;function r(i,a){return i.getEditorState().read(()=>{const l=t.$getNodeByKey(a);return l===null?!1:l.isSelected()})}function o(i){const[a]=e.useLexicalComposerContext(),[l,u]=n.useState(()=>r(a,i));n.useEffect(()=>{let _=!0;const v=a.registerUpdateListener(()=>{_&&u(r(a,i))});return()=>{_=!1,v()}},[a,i]);const p=n.useCallback(_=>{a.update(()=>{let v=t.$getSelection();t.$isNodeSelection(v)||(v=t.$createNodeSelection(),t.$setSelection(v)),t.$isNodeSelection(v)&&(_?v.add(i):v.delete(i))})},[a,i]),m=n.useCallback(()=>{a.update(()=>{const _=t.$getSelection();t.$isNodeSelection(_)&&_.clear()})},[a]);return[l,p,m]}return Yh.useLexicalNodeSelection=o,Yh}var qh={},A0;function DA(){if(A0)return qh;A0=1;var e=ur(),t=Xt(),n=z;function r(o,i){return o.getEditorState().read(()=>{let a=t.$getNodeByKey(i);return a===null?!1:a.isSelected()})}return qh.useLexicalNodeSelection=function(o){let[i]=e.useLexicalComposerContext(),[a,l]=n.useState(()=>r(i,o));n.useEffect(()=>{let m=!0,_=i.registerUpdateListener(()=>{m&&l(r(i,o))});return()=>{m=!1,_()}},[i,o]);let u=n.useCallback(m=>{i.update(()=>{let _=t.$getSelection();t.$isNodeSelection(_)||(_=t.$createNodeSelection(),t.$setSelection(_)),t.$isNodeSelection(_)&&(m?_.add(o):_.delete(o))})},[i,o]),p=n.useCallback(()=>{i.update(()=>{const m=t.$getSelection();t.$isNodeSelection(m)&&m.clear()})},[i]);return[a,u,p]},qh}var R0,$0;function mE(){return $0||($0=1,R0=process.env.NODE_ENV==="development"?$A():DA()),R0}var D0;function MA(){if(D0)return hl;D0=1;var e=ur(),t=mE(),n=vn(),r=Xt(),o=z;const i=r.createCommand("INSERT_HORIZONTAL_RULE_COMMAND");function a({nodeKey:_}){const[v]=e.useLexicalComposerContext(),[C,b,y]=t.useLexicalNodeSelection(_),N=o.useCallback(R=>{if(C&&r.$isNodeSelection(r.$getSelection())){R.preventDefault();const O=r.$getNodeByKey(_);m(O)&&O.remove()}return!1},[C,_]);return o.useEffect(()=>n.mergeRegister(v.registerCommand(r.CLICK_COMMAND,R=>{const O=v.getElementByKey(_);return R.target===O?(R.shiftKey||y(),b(!C),!0):!1},r.COMMAND_PRIORITY_LOW),v.registerCommand(r.KEY_DELETE_COMMAND,N,r.COMMAND_PRIORITY_LOW),v.registerCommand(r.KEY_BACKSPACE_COMMAND,N,r.COMMAND_PRIORITY_LOW)),[y,v,C,_,N,b]),o.useEffect(()=>{const R=v.getElementByKey(_);R!==null&&(R.className=C?"selected":"")},[v,C,_]),null}class l extends r.DecoratorNode{static getType(){return"horizontalrule"}static clone(v){return new l(v.__key)}static importJSON(v){return p()}static importDOM(){return{hr:()=>({conversion:u,priority:0})}}exportJSON(){return{type:"horizontalrule",version:1}}exportDOM(){return{element:document.createElement("hr")}}createDOM(){return document.createElement("hr")}getTextContent(){return`
|
|
121
|
-
`}isInline(){return!1}updateDOM(){return!1}decorate(){return o.createElement(a,{nodeKey:this.__key})}}function u(){return{node:p()}}function p(){return r.$applyNodeReplacement(new l)}function m(_){return _ instanceof l}return hl.$createHorizontalRuleNode=p,hl.$isHorizontalRuleNode=m,hl.HorizontalRuleNode=l,hl.INSERT_HORIZONTAL_RULE_COMMAND=i,hl}var pl={},M0;function kA(){if(M0)return pl;M0=1;var e=ur(),t=mE(),n=vn(),r=Xt(),o=z;let i=r.createCommand("INSERT_HORIZONTAL_RULE_COMMAND");function a({nodeKey:_}){let[v]=e.useLexicalComposerContext(),[C,b,y]=t.useLexicalNodeSelection(_),N=o.useCallback(R=>(C&&r.$isNodeSelection(r.$getSelection())&&(R.preventDefault(),R=r.$getNodeByKey(_),m(R)&&R.remove()),!1),[C,_]);return o.useEffect(()=>n.mergeRegister(v.registerCommand(r.CLICK_COMMAND,R=>{let O=v.getElementByKey(_);return R.target===O?(R.shiftKey||y(),b(!C),!0):!1},r.COMMAND_PRIORITY_LOW),v.registerCommand(r.KEY_DELETE_COMMAND,N,r.COMMAND_PRIORITY_LOW),v.registerCommand(r.KEY_BACKSPACE_COMMAND,N,r.COMMAND_PRIORITY_LOW)),[y,v,C,_,N,b]),o.useEffect(()=>{let R=v.getElementByKey(_);R!==null&&(R.className=C?"selected":"")},[v,C,_]),null}class l extends r.DecoratorNode{static getType(){return"horizontalrule"}static clone(v){return new l(v.__key)}static importJSON(){return p()}static importDOM(){return{hr:()=>({conversion:u,priority:0})}}exportJSON(){return{type:"horizontalrule",version:1}}exportDOM(){return{element:document.createElement("hr")}}createDOM(){return document.createElement("hr")}getTextContent(){return`
|
|
122
|
-
`}isInline(){return!1}updateDOM(){return!1}decorate(){return o.createElement(a,{nodeKey:this.__key})}}function u(){return{node:p()}}function p(){return r.$applyNodeReplacement(new l)}function m(_){return _ instanceof l}return pl.$createHorizontalRuleNode=p,pl.$isHorizontalRuleNode=m,pl.HorizontalRuleNode=l,pl.INSERT_HORIZONTAL_RULE_COMMAND=i,pl}process.env.NODE_ENV==="development"?MA():kA();var k0=Object.prototype.hasOwnProperty;function P0(e,t,n){for(n of e.keys())if(bu(n,t))return n}function bu(e,t){var n,r,o;if(e===t)return!0;if(e&&t&&(n=e.constructor)===t.constructor){if(n===Date)return e.getTime()===t.getTime();if(n===RegExp)return e.toString()===t.toString();if(n===Array){if((r=e.length)===t.length)for(;r--&&bu(e[r],t[r]););return r===-1}if(n===Set){if(e.size!==t.size)return!1;for(r of e)if(o=r,o&&typeof o=="object"&&(o=P0(t,o),!o)||!t.has(o))return!1;return!0}if(n===Map){if(e.size!==t.size)return!1;for(r of e)if(o=r[0],o&&typeof o=="object"&&(o=P0(t,o),!o)||!bu(r[1],t.get(o)))return!1;return!0}if(n===ArrayBuffer)e=new Uint8Array(e),t=new Uint8Array(t);else if(n===DataView){if((r=e.byteLength)===t.byteLength)for(;r--&&e.getInt8(r)===t.getInt8(r););return r===-1}if(ArrayBuffer.isView(e)){if((r=e.byteLength)===t.byteLength)for(;r--&&e[r]===t[r];);return r===-1}if(!n||typeof e=="object"){r=0;for(n in e)if(k0.call(e,n)&&++r&&!k0.call(t,n)||!(n in t)||!bu(e[n],t[n]))return!1;return Object.keys(t).length===r}}return e!==e&&t!==t}let Lp,vE,yE,bE,_E=!0;typeof process<"u"&&({FORCE_COLOR:Lp,NODE_DISABLE_COLORS:vE,NO_COLOR:yE,TERM:bE}=process.env||{},_E=process.stdout&&process.stdout.isTTY);const Qt={enabled:!vE&&yE==null&&bE!=="dumb"&&(Lp!=null&&Lp!=="0"||_E),reset:xn(0,0),bold:xn(1,22),dim:xn(2,22),italic:xn(3,23),underline:xn(4,24),inverse:xn(7,27),hidden:xn(8,28),strikethrough:xn(9,29),black:xn(30,39),red:xn(31,39),green:xn(32,39),yellow:xn(33,39),blue:xn(34,39),magenta:xn(35,39),cyan:xn(36,39),white:xn(37,39),gray:xn(90,39),grey:xn(90,39),bgBlack:xn(40,49),bgRed:xn(41,49),bgGreen:xn(42,49),bgYellow:xn(43,49),bgBlue:xn(44,49),bgMagenta:xn(45,49),bgCyan:xn(46,49),bgWhite:xn(47,49)};function I0(e,t){let n=0,r,o="",i="";for(;n<e.length;n++)r=e[n],o+=r.open,i+=r.close,~t.indexOf(r.close)&&(t=t.replace(r.rgx,r.close+r.open));return o+t+i}function PA(e,t){let n={has:e,keys:t};return n.reset=Qt.reset.bind(n),n.bold=Qt.bold.bind(n),n.dim=Qt.dim.bind(n),n.italic=Qt.italic.bind(n),n.underline=Qt.underline.bind(n),n.inverse=Qt.inverse.bind(n),n.hidden=Qt.hidden.bind(n),n.strikethrough=Qt.strikethrough.bind(n),n.black=Qt.black.bind(n),n.red=Qt.red.bind(n),n.green=Qt.green.bind(n),n.yellow=Qt.yellow.bind(n),n.blue=Qt.blue.bind(n),n.magenta=Qt.magenta.bind(n),n.cyan=Qt.cyan.bind(n),n.white=Qt.white.bind(n),n.gray=Qt.gray.bind(n),n.grey=Qt.grey.bind(n),n.bgBlack=Qt.bgBlack.bind(n),n.bgRed=Qt.bgRed.bind(n),n.bgGreen=Qt.bgGreen.bind(n),n.bgYellow=Qt.bgYellow.bind(n),n.bgBlue=Qt.bgBlue.bind(n),n.bgMagenta=Qt.bgMagenta.bind(n),n.bgCyan=Qt.bgCyan.bind(n),n.bgWhite=Qt.bgWhite.bind(n),n}function xn(e,t){let n={open:`\x1B[${e}m`,close:`\x1B[${t}m`,rgx:new RegExp(`\\x1b\\[${t}m`,"g")};return function(r){return this!==void 0&&this.has!==void 0?(~this.has.indexOf(e)||(this.has.push(e),this.keys.push(n)),r===void 0?this:Qt.enabled?I0(this.keys,r+""):r+""):r===void 0?PA([e],[n]):Qt.enabled?I0([n],r+""):r+""}}function Wa(){}Wa.prototype={diff:function(e,t){var n,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=r.callback;typeof r=="function"&&(o=r,r={}),this.options=r;var i=this;function a(k){return o?(setTimeout(function(){o(void 0,k)},0),!0):k}e=this.castInput(e),t=this.castInput(t),e=this.removeEmpty(this.tokenize(e)),t=this.removeEmpty(this.tokenize(t));var l=t.length,u=e.length,p=1,m=l+u;r.maxEditLength&&(m=Math.min(m,r.maxEditLength));var _=(n=r.timeout)!==null&&n!==void 0?n:1/0,v=Date.now()+_,C=[{oldPos:-1,lastComponent:void 0}],b=this.extractCommon(C[0],t,e,0);if(C[0].oldPos+1>=u&&b+1>=l)return a([{value:this.join(t),count:t.length}]);var y=-1/0,N=1/0;function R(){for(var k=Math.max(y,-p);k<=Math.min(N,p);k+=2){var I=void 0,M=C[k-1],Y=C[k+1];M&&(C[k-1]=void 0);var ee=!1;if(Y){var re=Y.oldPos-k;ee=Y&&0<=re&&re<l}var Z=M&&M.oldPos+1<u;if(!ee&&!Z){C[k]=void 0;continue}if(!Z||ee&&M.oldPos+1<Y.oldPos?I=i.addToPath(Y,!0,void 0,0):I=i.addToPath(M,void 0,!0,1),b=i.extractCommon(I,t,e,k),I.oldPos+1>=u&&b+1>=l)return a(IA(i,I.lastComponent,t,e,i.useLongestToken));C[k]=I,I.oldPos+1>=u&&(N=Math.min(N,k-1)),b+1>=l&&(y=Math.max(y,k+1))}p++}if(o)(function k(){setTimeout(function(){if(p>m||Date.now()>v)return o();R()||k()},0)})();else for(;p<=m&&Date.now()<=v;){var O=R();if(O)return O}},addToPath:function(e,t,n,r){var o=e.lastComponent;return o&&o.added===t&&o.removed===n?{oldPos:e.oldPos+r,lastComponent:{count:o.count+1,added:t,removed:n,previousComponent:o.previousComponent}}:{oldPos:e.oldPos+r,lastComponent:{count:1,added:t,removed:n,previousComponent:o}}},extractCommon:function(e,t,n,r){for(var o=t.length,i=n.length,a=e.oldPos,l=a-r,u=0;l+1<o&&a+1<i&&this.equals(t[l+1],n[a+1]);)l++,a++,u++;return u&&(e.lastComponent={count:u,previousComponent:e.lastComponent}),e.oldPos=a,l},equals:function(e,t){return this.options.comparator?this.options.comparator(e,t):e===t||this.options.ignoreCase&&e.toLowerCase()===t.toLowerCase()},removeEmpty:function(e){for(var t=[],n=0;n<e.length;n++)e[n]&&t.push(e[n]);return t},castInput:function(e){return e},tokenize:function(e){return e.split("")},join:function(e){return e.join("")}};function IA(e,t,n,r,o){for(var i=[],a;t;)i.push(t),a=t.previousComponent,delete t.previousComponent,t=a;i.reverse();for(var l=0,u=i.length,p=0,m=0;l<u;l++){var _=i[l];if(_.removed){if(_.value=e.join(r.slice(m,m+_.count)),m+=_.count,l&&i[l-1].added){var v=i[l-1];i[l-1]=i[l],i[l]=v}}else{if(!_.added&&o){var C=n.slice(p,p+_.count);C=C.map(function(y,N){var R=r[m+N];return R.length>y.length?R:y}),_.value=e.join(C)}else _.value=e.join(n.slice(p,p+_.count));p+=_.count,_.added||(m+=_.count)}}var b=i[u-1];return u>1&&typeof b.value=="string"&&(b.added||b.removed)&&e.equals("",b.value)&&(i[u-2].value+=b.value,i.pop()),i}var L0=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,F0=/\S/,xE=new Wa;xE.equals=function(e,t){return this.options.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e===t||this.options.ignoreWhitespace&&!F0.test(e)&&!F0.test(t)};xE.tokenize=function(e){for(var t=e.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/),n=0;n<t.length-1;n++)!t[n+1]&&t[n+2]&&L0.test(t[n])&&L0.test(t[n+2])&&(t[n]+=t[n+2],t.splice(n+1,2),n--);return t};var EE=new Wa;EE.tokenize=function(e){this.options.stripTrailingCr&&(e=e.replace(/\r\n/g,`
|
|
123
|
-
`));var t=[],n=e.split(/(\n|\r\n)/);n[n.length-1]||n.pop();for(var r=0;r<n.length;r++){var o=n[r];r%2&&!this.options.newlineIsToken?t[t.length-1]+=o:(this.options.ignoreWhitespace&&(o=o.trim()),t.push(o))}return t};var LA=new Wa;LA.tokenize=function(e){return e.split(/(\S.+?[.!?])(?=\s+|$)/)};var FA=new Wa;FA.tokenize=function(e){return e.split(/([{}:;,]|\s+)/)};function Jd(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Jd=function(t){return typeof t}:Jd=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Jd(e)}var jA=Object.prototype.toString,wu=new Wa;wu.useLongestToken=!0;wu.tokenize=EE.tokenize;wu.castInput=function(e){var t=this.options,n=t.undefinedReplacement,r=t.stringifyReplacer,o=r===void 0?function(i,a){return typeof a>"u"?n:a}:r;return typeof e=="string"?e:JSON.stringify(Fp(e,null,null,o),o," ")};wu.equals=function(e,t){return Wa.prototype.equals.call(wu,e.replace(/,([\r\n])/g,"$1"),t.replace(/,([\r\n])/g,"$1"))};function Fp(e,t,n,r,o){t=t||[],n=n||[],r&&(e=r(o,e));var i;for(i=0;i<t.length;i+=1)if(t[i]===e)return n[i];var a;if(jA.call(e)==="[object Array]"){for(t.push(e),a=new Array(e.length),n.push(a),i=0;i<e.length;i+=1)a[i]=Fp(e[i],t,n,r,o);return t.pop(),n.pop(),a}if(e&&e.toJSON&&(e=e.toJSON()),Jd(e)==="object"&&e!==null){t.push(e),a={},n.push(a);var l=[],u;for(u in e)e.hasOwnProperty(u)&&l.push(u);for(l.sort(),i=0;i<l.length;i+=1)u=l[i],a[u]=Fp(e[u],t,n,r,u);t.pop(),n.pop()}else a=e;return a}var jp=new Wa;jp.tokenize=function(e){return e.slice()};jp.join=jp.removeEmpty=function(e){return e};Qt.red,Qt.grey,Qt.green;Qt.dim().italic;Qt.dim("→");Qt.dim("·");Qt.dim("↵");function af(e){e=e.replace(/\r?\n/g,`
|
|
124
|
-
`);let t=e.match(/^[ \t]*(?=\S)/gm),n=0,r=1/0,o=(t||[]).length;for(;n<o;n++)r=Math.min(r,t[n].length);return o&&r?e.replace(new RegExp(`^[ \\t]{${r}}`,"gm"),""):e}class BA extends Error{constructor(t={}){super(t.message),this.name="Assertion",this.code="ERR_ASSERTION",Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.details=t.details||!1,this.generated=!!t.generated,this.operator=t.operator,this.expects=t.expects,this.actual=t.actual}}function Wo(e,t,n,r,o,i,a){if(e)return;let l=a||i;if(a instanceof Error)throw a;let u=o;throw new BA({actual:t,expects:n,operator:r,message:l,details:u,generated:!a})}function Yi(e,t){Wo(!e,!0,!1,"not",!1,"Expected value to be falsey",t)}Yi.ok=Yi;Yi.equal=function(e,t,n){Wo(!bu(e,t),e,t,"not.equal",!1,"Expected values not to be deeply equal",n)};Yi.type=function(e,t,n){let r=typeof e;Wo(r!==t,r,t,"not.type",!1,`Expected "${r}" not to be "${t}"`,n)};Yi.instance=function(e,t,n){let r="`"+(t.name||t.constructor.name)+"`";Wo(!(e instanceof t),e,t,"not.instance",!1,`Expected value not to be an instance of ${r}`,n)};Yi.snapshot=function(e,t,n){e=af(e),t=af(t),Wo(e!==t,e,t,"not.snapshot",!1,"Expected value not to match snapshot",n)};Yi.fixture=function(e,t,n){e=af(e),t=af(t),Wo(e!==t,e,t,"not.fixture",!1,"Expected value not to match fixture",n)};Yi.match=function(e,t,n){typeof t=="string"?Wo(!e.includes(t),e,t,"not.match",!1,`Expected value not to include "${t}" substring`,n):Wo(!t.test(e),e,t,"not.match",!1,`Expected value not to match \`${String(t)}\` pattern`,n)};Yi.throws=function(e,t,n){!n&&typeof t=="string"&&(n=t,t=null);try{e()}catch(r){typeof t=="function"?Wo(!t(r),!0,!1,"not.throws",!1,"Expected function not to throw matching exception",n):t instanceof RegExp?Wo(!t.test(r.message),!0,!1,"not.throws",!1,`Expected function not to throw exception matching \`${String(t)}\` pattern`,n):t||Wo(!1,!0,!1,"not.throws",!1,"Expected function not to throw",n)}};class Ss extends Error{}class HA extends Ss{constructor(t){super(`Invalid DateTime: ${t.toMessage()}`)}}class WA extends Ss{constructor(t){super(`Invalid Interval: ${t.toMessage()}`)}}class zA extends Ss{constructor(t){super(`Invalid Duration: ${t.toMessage()}`)}}class Fl extends Ss{}class CE extends Ss{constructor(t){super(`Invalid unit ${t}`)}}class Wr extends Ss{}class Ta extends Ss{constructor(){super("Zone is an abstract class")}}const vt="numeric",zo="short",io="long",sf={year:vt,month:vt,day:vt},wE={year:vt,month:zo,day:vt},KA={year:vt,month:zo,day:vt,weekday:zo},NE={year:vt,month:io,day:vt},TE={year:vt,month:io,day:vt,weekday:io},SE={hour:vt,minute:vt},OE={hour:vt,minute:vt,second:vt},AE={hour:vt,minute:vt,second:vt,timeZoneName:zo},RE={hour:vt,minute:vt,second:vt,timeZoneName:io},$E={hour:vt,minute:vt,hourCycle:"h23"},DE={hour:vt,minute:vt,second:vt,hourCycle:"h23"},ME={hour:vt,minute:vt,second:vt,hourCycle:"h23",timeZoneName:zo},kE={hour:vt,minute:vt,second:vt,hourCycle:"h23",timeZoneName:io},PE={year:vt,month:vt,day:vt,hour:vt,minute:vt},IE={year:vt,month:vt,day:vt,hour:vt,minute:vt,second:vt},LE={year:vt,month:zo,day:vt,hour:vt,minute:vt},FE={year:vt,month:zo,day:vt,hour:vt,minute:vt,second:vt},GA={year:vt,month:zo,day:vt,weekday:zo,hour:vt,minute:vt},jE={year:vt,month:io,day:vt,hour:vt,minute:vt,timeZoneName:zo},BE={year:vt,month:io,day:vt,hour:vt,minute:vt,second:vt,timeZoneName:zo},HE={year:vt,month:io,day:vt,weekday:io,hour:vt,minute:vt,timeZoneName:io},WE={year:vt,month:io,day:vt,weekday:io,hour:vt,minute:vt,second:vt,timeZoneName:io};class Du{get type(){throw new Ta}get name(){throw new Ta}get ianaName(){return this.name}get isUniversal(){throw new Ta}offsetName(t,n){throw new Ta}formatOffset(t,n){throw new Ta}offset(t){throw new Ta}equals(t){throw new Ta}get isValid(){throw new Ta}}let Zh=null;class Af extends Du{static get instance(){return Zh===null&&(Zh=new Af),Zh}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(t,{format:n,locale:r}){return JE(t,n,r)}formatOffset(t,n){return _u(this.offset(t),n)}offset(t){return-new Date(t).getTimezoneOffset()}equals(t){return t.type==="system"}get isValid(){return!0}}let Xd={};function UA(e){return Xd[e]||(Xd[e]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"})),Xd[e]}const VA={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function YA(e,t){const n=e.format(t).replace(/\u200E/g,""),r=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(n),[,o,i,a,l,u,p,m]=r;return[a,o,i,l,u,p,m]}function qA(e,t){const n=e.formatToParts(t),r=[];for(let o=0;o<n.length;o++){const{type:i,value:a}=n[o],l=VA[i];i==="era"?r[l]=a:Ht(l)||(r[l]=parseInt(a,10))}return r}let Rd={};class qi extends Du{static create(t){return Rd[t]||(Rd[t]=new qi(t)),Rd[t]}static resetCache(){Rd={},Xd={}}static isValidSpecifier(t){return this.isValidZone(t)}static isValidZone(t){if(!t)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:t}).format(),!0}catch{return!1}}constructor(t){super(),this.zoneName=t,this.valid=qi.isValidZone(t)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(t,{format:n,locale:r}){return JE(t,n,r,this.name)}formatOffset(t,n){return _u(this.offset(t),n)}offset(t){const n=new Date(t);if(isNaN(n))return NaN;const r=UA(this.name);let[o,i,a,l,u,p,m]=r.formatToParts?qA(r,n):YA(r,n);l==="BC"&&(o=-Math.abs(o)+1);const _=$f({year:o,month:i,day:a,hour:u===24?0:u,minute:p,second:m,millisecond:0});let v=+n;const C=v%1e3;return v-=C>=0?C:1e3+C,(_-v)/(60*1e3)}equals(t){return t.type==="iana"&&t.name===this.name}get isValid(){return this.valid}}let j0={};function ZA(e,t={}){const n=JSON.stringify([e,t]);let r=j0[n];return r||(r=new Intl.ListFormat(e,t),j0[n]=r),r}let Bp={};function Hp(e,t={}){const n=JSON.stringify([e,t]);let r=Bp[n];return r||(r=new Intl.DateTimeFormat(e,t),Bp[n]=r),r}let Wp={};function JA(e,t={}){const n=JSON.stringify([e,t]);let r=Wp[n];return r||(r=new Intl.NumberFormat(e,t),Wp[n]=r),r}let zp={};function XA(e,t={}){const{base:n,...r}=t,o=JSON.stringify([e,r]);let i=zp[o];return i||(i=new Intl.RelativeTimeFormat(e,t),zp[o]=i),i}let Qd=null;function QA(){return Qd||(Qd=new Intl.DateTimeFormat().resolvedOptions().locale,Qd)}let B0={};function eR(e){let t=B0[e];if(!t){const n=new Intl.Locale(e);t="getWeekInfo"in n?n.getWeekInfo():n.weekInfo,B0[e]=t}return t}function tR(e){const t=e.indexOf("-x-");t!==-1&&(e=e.substring(0,t));const n=e.indexOf("-u-");if(n===-1)return[e];{let r,o;try{r=Hp(e).resolvedOptions(),o=e}catch{const l=e.substring(0,n);r=Hp(l).resolvedOptions(),o=l}const{numberingSystem:i,calendar:a}=r;return[o,i,a]}}function nR(e,t,n){return(n||t)&&(e.includes("-u-")||(e+="-u"),n&&(e+=`-ca-${n}`),t&&(e+=`-nu-${t}`)),e}function rR(e){const t=[];for(let n=1;n<=12;n++){const r=Cn.utc(2009,n,1);t.push(e(r))}return t}function oR(e){const t=[];for(let n=1;n<=7;n++){const r=Cn.utc(2016,11,13+n);t.push(e(r))}return t}function $d(e,t,n,r){const o=e.listingMode();return o==="error"?null:o==="en"?n(t):r(t)}function iR(e){return e.numberingSystem&&e.numberingSystem!=="latn"?!1:e.numberingSystem==="latn"||!e.locale||e.locale.startsWith("en")||new Intl.DateTimeFormat(e.intl).resolvedOptions().numberingSystem==="latn"}class aR{constructor(t,n,r){this.padTo=r.padTo||0,this.floor=r.floor||!1;const{padTo:o,floor:i,...a}=r;if(!n||Object.keys(a).length>0){const l={useGrouping:!1,...r};r.padTo>0&&(l.minimumIntegerDigits=r.padTo),this.inf=JA(t,l)}}format(t){if(this.inf){const n=this.floor?Math.floor(t):t;return this.inf.format(n)}else{const n=this.floor?Math.floor(t):Bg(t,3);return Qn(n,this.padTo)}}}class sR{constructor(t,n,r){this.opts=r,this.originalZone=void 0;let o;if(this.opts.timeZone)this.dt=t;else if(t.zone.type==="fixed"){const a=-1*(t.offset/60),l=a>=0?`Etc/GMT+${a}`:`Etc/GMT${a}`;t.offset!==0&&qi.create(l).valid?(o=l,this.dt=t):(o="UTC",this.dt=t.offset===0?t:t.setZone("UTC").plus({minutes:t.offset}),this.originalZone=t.zone)}else t.zone.type==="system"?this.dt=t:t.zone.type==="iana"?(this.dt=t,o=t.zone.name):(o="UTC",this.dt=t.setZone("UTC").plus({minutes:t.offset}),this.originalZone=t.zone);const i={...this.opts};i.timeZone=i.timeZone||o,this.dtf=Hp(n,i)}format(){return this.originalZone?this.formatToParts().map(({value:t})=>t).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){const t=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?t.map(n=>{if(n.type==="timeZoneName"){const r=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...n,value:r}}else return n}):t}resolvedOptions(){return this.dtf.resolvedOptions()}}class lR{constructor(t,n,r){this.opts={style:"long",...r},!n&&qE()&&(this.rtf=XA(t,r))}format(t,n){return this.rtf?this.rtf.format(t,n):OR(n,t,this.opts.numeric,this.opts.style!=="long")}formatToParts(t,n){return this.rtf?this.rtf.formatToParts(t,n):[]}}const cR={firstDay:1,minimalDays:4,weekend:[6,7]};let Ln=class gu{static fromOpts(t){return gu.create(t.locale,t.numberingSystem,t.outputCalendar,t.weekSettings,t.defaultToEN)}static create(t,n,r,o,i=!1){const a=t||qn.defaultLocale,l=a||(i?"en-US":QA()),u=n||qn.defaultNumberingSystem,p=r||qn.defaultOutputCalendar,m=Kp(o)||qn.defaultWeekSettings;return new gu(l,u,p,m,a)}static resetCache(){Qd=null,Bp={},Wp={},zp={}}static fromObject({locale:t,numberingSystem:n,outputCalendar:r,weekSettings:o}={}){return gu.create(t,n,r,o)}constructor(t,n,r,o,i){const[a,l,u]=tR(t);this.locale=a,this.numberingSystem=n||l||null,this.outputCalendar=r||u||null,this.weekSettings=o,this.intl=nR(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=i,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=iR(this)),this.fastNumbersCached}listingMode(){const t=this.isEnglish(),n=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return t&&n?"en":"intl"}clone(t){return!t||Object.getOwnPropertyNames(t).length===0?this:gu.create(t.locale||this.specifiedLocale,t.numberingSystem||this.numberingSystem,t.outputCalendar||this.outputCalendar,Kp(t.weekSettings)||this.weekSettings,t.defaultToEN||!1)}redefaultToEN(t={}){return this.clone({...t,defaultToEN:!0})}redefaultToSystem(t={}){return this.clone({...t,defaultToEN:!1})}months(t,n=!1){return $d(this,t,eC,()=>{const r=n?{month:t,day:"numeric"}:{month:t},o=n?"format":"standalone";return this.monthsCache[o][t]||(this.monthsCache[o][t]=rR(i=>this.extract(i,r,"month"))),this.monthsCache[o][t]})}weekdays(t,n=!1){return $d(this,t,rC,()=>{const r=n?{weekday:t,year:"numeric",month:"long",day:"numeric"}:{weekday:t},o=n?"format":"standalone";return this.weekdaysCache[o][t]||(this.weekdaysCache[o][t]=oR(i=>this.extract(i,r,"weekday"))),this.weekdaysCache[o][t]})}meridiems(){return $d(this,void 0,()=>oC,()=>{if(!this.meridiemCache){const t={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[Cn.utc(2016,11,13,9),Cn.utc(2016,11,13,19)].map(n=>this.extract(n,t,"dayperiod"))}return this.meridiemCache})}eras(t){return $d(this,t,iC,()=>{const n={era:t};return this.eraCache[t]||(this.eraCache[t]=[Cn.utc(-40,1,1),Cn.utc(2017,1,1)].map(r=>this.extract(r,n,"era"))),this.eraCache[t]})}extract(t,n,r){const o=this.dtFormatter(t,n),i=o.formatToParts(),a=i.find(l=>l.type.toLowerCase()===r);return a?a.value:null}numberFormatter(t={}){return new aR(this.intl,t.forceSimple||this.fastNumbers,t)}dtFormatter(t,n={}){return new sR(t,this.intl,n)}relFormatter(t={}){return new lR(this.intl,this.isEnglish(),t)}listFormatter(t={}){return ZA(this.intl,t)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:ZE()?eR(this.locale):cR}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(t){return this.locale===t.locale&&this.numberingSystem===t.numberingSystem&&this.outputCalendar===t.outputCalendar}},Jh=null;class Lr extends Du{static get utcInstance(){return Jh===null&&(Jh=new Lr(0)),Jh}static instance(t){return t===0?Lr.utcInstance:new Lr(t)}static parseSpecifier(t){if(t){const n=t.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(n)return new Lr(Df(n[1],n[2]))}return null}constructor(t){super(),this.fixed=t}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${_u(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${_u(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(t,n){return _u(this.fixed,n)}get isUniversal(){return!0}offset(){return this.fixed}equals(t){return t.type==="fixed"&&t.fixed===this.fixed}get isValid(){return!0}}class uR extends Du{constructor(t){super(),this.zoneName=t}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function Ma(e,t){if(Ht(e)||e===null)return t;if(e instanceof Du)return e;if(hR(e)){const n=e.toLowerCase();return n==="default"?t:n==="local"||n==="system"?Af.instance:n==="utc"||n==="gmt"?Lr.utcInstance:Lr.parseSpecifier(n)||qi.create(e)}else return Es(e)?Lr.instance(e):typeof e=="object"&&"offset"in e&&typeof e.offset=="function"?e:new uR(e)}let H0=()=>Date.now(),W0="system",z0=null,K0=null,G0=null,U0=60,V0,Y0=null;class qn{static get now(){return H0}static set now(t){H0=t}static set defaultZone(t){W0=t}static get defaultZone(){return Ma(W0,Af.instance)}static get defaultLocale(){return z0}static set defaultLocale(t){z0=t}static get defaultNumberingSystem(){return K0}static set defaultNumberingSystem(t){K0=t}static get defaultOutputCalendar(){return G0}static set defaultOutputCalendar(t){G0=t}static get defaultWeekSettings(){return Y0}static set defaultWeekSettings(t){Y0=Kp(t)}static get twoDigitCutoffYear(){return U0}static set twoDigitCutoffYear(t){U0=t%100}static get throwOnInvalid(){return V0}static set throwOnInvalid(t){V0=t}static resetCaches(){Ln.resetCache(),qi.resetCache()}}class jo{constructor(t,n){this.reason=t,this.explanation=n}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const zE=[0,31,59,90,120,151,181,212,243,273,304,334],KE=[0,31,60,91,121,152,182,213,244,274,305,335];function yo(e,t){return new jo("unit out of range",`you specified ${t} (of type ${typeof t}) as a ${e}, which is invalid`)}function Lg(e,t,n){const r=new Date(Date.UTC(e,t-1,n));e<100&&e>=0&&r.setUTCFullYear(r.getUTCFullYear()-1900);const o=r.getUTCDay();return o===0?7:o}function GE(e,t,n){return n+(Mu(e)?KE:zE)[t-1]}function UE(e,t){const n=Mu(e)?KE:zE,r=n.findIndex(i=>i<t),o=t-n[r];return{month:r+1,day:o}}function Fg(e,t){return(e-t+7)%7+1}function lf(e,t=4,n=1){const{year:r,month:o,day:i}=e,a=GE(r,o,i),l=Fg(Lg(r,o,i),n);let u=Math.floor((a-l+14-t)/7),p;return u<1?(p=r-1,u=Nu(p,t,n)):u>Nu(r,t,n)?(p=r+1,u=1):p=r,{weekYear:p,weekNumber:u,weekday:l,...Mf(e)}}function q0(e,t=4,n=1){const{weekYear:r,weekNumber:o,weekday:i}=e,a=Fg(Lg(r,1,t),n),l=Hl(r);let u=o*7+i-a-7+t,p;u<1?(p=r-1,u+=Hl(p)):u>l?(p=r+1,u-=Hl(r)):p=r;const{month:m,day:_}=UE(p,u);return{year:p,month:m,day:_,...Mf(e)}}function Xh(e){const{year:t,month:n,day:r}=e,o=GE(t,n,r);return{year:t,ordinal:o,...Mf(e)}}function Z0(e){const{year:t,ordinal:n}=e,{month:r,day:o}=UE(t,n);return{year:t,month:r,day:o,...Mf(e)}}function J0(e,t){if(!Ht(e.localWeekday)||!Ht(e.localWeekNumber)||!Ht(e.localWeekYear)){if(!Ht(e.weekday)||!Ht(e.weekNumber)||!Ht(e.weekYear))throw new Fl("Cannot mix locale-based week fields with ISO-based week fields");return Ht(e.localWeekday)||(e.weekday=e.localWeekday),Ht(e.localWeekNumber)||(e.weekNumber=e.localWeekNumber),Ht(e.localWeekYear)||(e.weekYear=e.localWeekYear),delete e.localWeekday,delete e.localWeekNumber,delete e.localWeekYear,{minDaysInFirstWeek:t.getMinDaysInFirstWeek(),startOfWeek:t.getStartOfWeek()}}else return{minDaysInFirstWeek:4,startOfWeek:1}}function dR(e,t=4,n=1){const r=Rf(e.weekYear),o=bo(e.weekNumber,1,Nu(e.weekYear,t,n)),i=bo(e.weekday,1,7);return r?o?i?!1:yo("weekday",e.weekday):yo("week",e.weekNumber):yo("weekYear",e.weekYear)}function fR(e){const t=Rf(e.year),n=bo(e.ordinal,1,Hl(e.year));return t?n?!1:yo("ordinal",e.ordinal):yo("year",e.year)}function VE(e){const t=Rf(e.year),n=bo(e.month,1,12),r=bo(e.day,1,cf(e.year,e.month));return t?n?r?!1:yo("day",e.day):yo("month",e.month):yo("year",e.year)}function YE(e){const{hour:t,minute:n,second:r,millisecond:o}=e,i=bo(t,0,23)||t===24&&n===0&&r===0&&o===0,a=bo(n,0,59),l=bo(r,0,59),u=bo(o,0,999);return i?a?l?u?!1:yo("millisecond",o):yo("second",r):yo("minute",n):yo("hour",t)}function Ht(e){return typeof e>"u"}function Es(e){return typeof e=="number"}function Rf(e){return typeof e=="number"&&e%1===0}function hR(e){return typeof e=="string"}function pR(e){return Object.prototype.toString.call(e)==="[object Date]"}function qE(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function ZE(){try{return typeof Intl<"u"&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch{return!1}}function gR(e){return Array.isArray(e)?e:[e]}function X0(e,t,n){if(e.length!==0)return e.reduce((r,o)=>{const i=[t(o),o];return r&&n(r[0],i[0])===r[0]?r:i},null)[1]}function mR(e,t){return t.reduce((n,r)=>(n[r]=e[r],n),{})}function Vl(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Kp(e){if(e==null)return null;if(typeof e!="object")throw new Wr("Week settings must be an object");if(!bo(e.firstDay,1,7)||!bo(e.minimalDays,1,7)||!Array.isArray(e.weekend)||e.weekend.some(t=>!bo(t,1,7)))throw new Wr("Invalid week settings");return{firstDay:e.firstDay,minimalDays:e.minimalDays,weekend:Array.from(e.weekend)}}function bo(e,t,n){return Rf(e)&&e>=t&&e<=n}function vR(e,t){return e-t*Math.floor(e/t)}function Qn(e,t=2){const n=e<0;let r;return n?r="-"+(""+-e).padStart(t,"0"):r=(""+e).padStart(t,"0"),r}function $a(e){if(!(Ht(e)||e===null||e===""))return parseInt(e,10)}function gs(e){if(!(Ht(e)||e===null||e===""))return parseFloat(e)}function jg(e){if(!(Ht(e)||e===null||e==="")){const t=parseFloat("0."+e)*1e3;return Math.floor(t)}}function Bg(e,t,n=!1){const r=10**t;return(n?Math.trunc:Math.round)(e*r)/r}function Mu(e){return e%4===0&&(e%100!==0||e%400===0)}function Hl(e){return Mu(e)?366:365}function cf(e,t){const n=vR(t-1,12)+1,r=e+(t-n)/12;return n===2?Mu(r)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][n-1]}function $f(e){let t=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute,e.second,e.millisecond);return e.year<100&&e.year>=0&&(t=new Date(t),t.setUTCFullYear(e.year,e.month-1,e.day)),+t}function Q0(e,t,n){return-Fg(Lg(e,1,t),n)+t-1}function Nu(e,t=4,n=1){const r=Q0(e,t,n),o=Q0(e+1,t,n);return(Hl(e)-r+o)/7}function Gp(e){return e>99?e:e>qn.twoDigitCutoffYear?1900+e:2e3+e}function JE(e,t,n,r=null){const o=new Date(e),i={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};r&&(i.timeZone=r);const a={timeZoneName:t,...i},l=new Intl.DateTimeFormat(n,a).formatToParts(o).find(u=>u.type.toLowerCase()==="timezonename");return l?l.value:null}function Df(e,t){let n=parseInt(e,10);Number.isNaN(n)&&(n=0);const r=parseInt(t,10)||0,o=n<0||Object.is(n,-0)?-r:r;return n*60+o}function XE(e){const t=Number(e);if(typeof e=="boolean"||e===""||Number.isNaN(t))throw new Wr(`Invalid unit value ${e}`);return t}function uf(e,t){const n={};for(const r in e)if(Vl(e,r)){const o=e[r];if(o==null)continue;n[t(r)]=XE(o)}return n}function _u(e,t){const n=Math.trunc(Math.abs(e/60)),r=Math.trunc(Math.abs(e%60)),o=e>=0?"+":"-";switch(t){case"short":return`${o}${Qn(n,2)}:${Qn(r,2)}`;case"narrow":return`${o}${n}${r>0?`:${r}`:""}`;case"techie":return`${o}${Qn(n,2)}${Qn(r,2)}`;default:throw new RangeError(`Value format ${t} is out of range for property format`)}}function Mf(e){return mR(e,["hour","minute","second","millisecond"])}const yR=["January","February","March","April","May","June","July","August","September","October","November","December"],QE=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],bR=["J","F","M","A","M","J","J","A","S","O","N","D"];function eC(e){switch(e){case"narrow":return[...bR];case"short":return[...QE];case"long":return[...yR];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}const tC=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],nC=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],_R=["M","T","W","T","F","S","S"];function rC(e){switch(e){case"narrow":return[..._R];case"short":return[...nC];case"long":return[...tC];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const oC=["AM","PM"],xR=["Before Christ","Anno Domini"],ER=["BC","AD"],CR=["B","A"];function iC(e){switch(e){case"narrow":return[...CR];case"short":return[...ER];case"long":return[...xR];default:return null}}function wR(e){return oC[e.hour<12?0:1]}function NR(e,t){return rC(t)[e.weekday-1]}function TR(e,t){return eC(t)[e.month-1]}function SR(e,t){return iC(t)[e.year<0?0:1]}function OR(e,t,n="always",r=!1){const o={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},i=["hours","minutes","seconds"].indexOf(e)===-1;if(n==="auto"&&i){const _=e==="days";switch(t){case 1:return _?"tomorrow":`next ${o[e][0]}`;case-1:return _?"yesterday":`last ${o[e][0]}`;case 0:return _?"today":`this ${o[e][0]}`}}const a=Object.is(t,-0)||t<0,l=Math.abs(t),u=l===1,p=o[e],m=r?u?p[1]:p[2]||p[1]:u?o[e][0]:e;return a?`${l} ${m} ago`:`in ${l} ${m}`}function eb(e,t){let n="";for(const r of e)r.literal?n+=r.val:n+=t(r.val);return n}const AR={D:sf,DD:wE,DDD:NE,DDDD:TE,t:SE,tt:OE,ttt:AE,tttt:RE,T:$E,TT:DE,TTT:ME,TTTT:kE,f:PE,ff:LE,fff:jE,ffff:HE,F:IE,FF:FE,FFF:BE,FFFF:WE};class $r{static create(t,n={}){return new $r(t,n)}static parseFormat(t){let n=null,r="",o=!1;const i=[];for(let a=0;a<t.length;a++){const l=t.charAt(a);l==="'"?(r.length>0&&i.push({literal:o||/^\s+$/.test(r),val:r}),n=null,r="",o=!o):o||l===n?r+=l:(r.length>0&&i.push({literal:/^\s+$/.test(r),val:r}),r=l,n=l)}return r.length>0&&i.push({literal:o||/^\s+$/.test(r),val:r}),i}static macroTokenToFormatOpts(t){return AR[t]}constructor(t,n){this.opts=n,this.loc=t,this.systemLoc=null}formatWithSystemDefault(t,n){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(t,{...this.opts,...n}).format()}dtFormatter(t,n={}){return this.loc.dtFormatter(t,{...this.opts,...n})}formatDateTime(t,n){return this.dtFormatter(t,n).format()}formatDateTimeParts(t,n){return this.dtFormatter(t,n).formatToParts()}formatInterval(t,n){return this.dtFormatter(t.start,n).dtf.formatRange(t.start.toJSDate(),t.end.toJSDate())}resolvedOptions(t,n){return this.dtFormatter(t,n).resolvedOptions()}num(t,n=0){if(this.opts.forceSimple)return Qn(t,n);const r={...this.opts};return n>0&&(r.padTo=n),this.loc.numberFormatter(r).format(t)}formatDateTimeFromString(t,n){const r=this.loc.listingMode()==="en",o=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",i=(C,b)=>this.loc.extract(t,C,b),a=C=>t.isOffsetFixed&&t.offset===0&&C.allowZ?"Z":t.isValid?t.zone.formatOffset(t.ts,C.format):"",l=()=>r?wR(t):i({hour:"numeric",hourCycle:"h12"},"dayperiod"),u=(C,b)=>r?TR(t,C):i(b?{month:C}:{month:C,day:"numeric"},"month"),p=(C,b)=>r?NR(t,C):i(b?{weekday:C}:{weekday:C,month:"long",day:"numeric"},"weekday"),m=C=>{const b=$r.macroTokenToFormatOpts(C);return b?this.formatWithSystemDefault(t,b):C},_=C=>r?SR(t,C):i({era:C},"era"),v=C=>{switch(C){case"S":return this.num(t.millisecond);case"u":case"SSS":return this.num(t.millisecond,3);case"s":return this.num(t.second);case"ss":return this.num(t.second,2);case"uu":return this.num(Math.floor(t.millisecond/10),2);case"uuu":return this.num(Math.floor(t.millisecond/100));case"m":return this.num(t.minute);case"mm":return this.num(t.minute,2);case"h":return this.num(t.hour%12===0?12:t.hour%12);case"hh":return this.num(t.hour%12===0?12:t.hour%12,2);case"H":return this.num(t.hour);case"HH":return this.num(t.hour,2);case"Z":return a({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return a({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return a({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return t.zone.offsetName(t.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return t.zone.offsetName(t.ts,{format:"long",locale:this.loc.locale});case"z":return t.zoneName;case"a":return l();case"d":return o?i({day:"numeric"},"day"):this.num(t.day);case"dd":return o?i({day:"2-digit"},"day"):this.num(t.day,2);case"c":return this.num(t.weekday);case"ccc":return p("short",!0);case"cccc":return p("long",!0);case"ccccc":return p("narrow",!0);case"E":return this.num(t.weekday);case"EEE":return p("short",!1);case"EEEE":return p("long",!1);case"EEEEE":return p("narrow",!1);case"L":return o?i({month:"numeric",day:"numeric"},"month"):this.num(t.month);case"LL":return o?i({month:"2-digit",day:"numeric"},"month"):this.num(t.month,2);case"LLL":return u("short",!0);case"LLLL":return u("long",!0);case"LLLLL":return u("narrow",!0);case"M":return o?i({month:"numeric"},"month"):this.num(t.month);case"MM":return o?i({month:"2-digit"},"month"):this.num(t.month,2);case"MMM":return u("short",!1);case"MMMM":return u("long",!1);case"MMMMM":return u("narrow",!1);case"y":return o?i({year:"numeric"},"year"):this.num(t.year);case"yy":return o?i({year:"2-digit"},"year"):this.num(t.year.toString().slice(-2),2);case"yyyy":return o?i({year:"numeric"},"year"):this.num(t.year,4);case"yyyyyy":return o?i({year:"numeric"},"year"):this.num(t.year,6);case"G":return _("short");case"GG":return _("long");case"GGGGG":return _("narrow");case"kk":return this.num(t.weekYear.toString().slice(-2),2);case"kkkk":return this.num(t.weekYear,4);case"W":return this.num(t.weekNumber);case"WW":return this.num(t.weekNumber,2);case"n":return this.num(t.localWeekNumber);case"nn":return this.num(t.localWeekNumber,2);case"ii":return this.num(t.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(t.localWeekYear,4);case"o":return this.num(t.ordinal);case"ooo":return this.num(t.ordinal,3);case"q":return this.num(t.quarter);case"qq":return this.num(t.quarter,2);case"X":return this.num(Math.floor(t.ts/1e3));case"x":return this.num(t.ts);default:return m(C)}};return eb($r.parseFormat(n),v)}formatDurationFromString(t,n){const r=u=>{switch(u[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"w":return"week";case"M":return"month";case"y":return"year";default:return null}},o=u=>p=>{const m=r(p);return m?this.num(u.get(m),p.length):p},i=$r.parseFormat(n),a=i.reduce((u,{literal:p,val:m})=>p?u:u.concat(m),[]),l=t.shiftTo(...a.map(r).filter(u=>u));return eb(i,o(l))}}const aC=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function Ql(...e){const t=e.reduce((n,r)=>n+r.source,"");return RegExp(`^${t}$`)}function ec(...e){return t=>e.reduce(([n,r,o],i)=>{const[a,l,u]=i(t,o);return[{...n,...a},l||r,u]},[{},null,1]).slice(0,2)}function tc(e,...t){if(e==null)return[null,null];for(const[n,r]of t){const o=n.exec(e);if(o)return r(o)}return[null,null]}function sC(...e){return(t,n)=>{const r={};let o;for(o=0;o<e.length;o++)r[e[o]]=$a(t[n+o]);return[r,null,n+o]}}const lC=/(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/,RR=`(?:${lC.source}?(?:\\[(${aC.source})\\])?)?`,Hg=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,cC=RegExp(`${Hg.source}${RR}`),Wg=RegExp(`(?:T${cC.source})?`),$R=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,DR=/(\d{4})-?W(\d\d)(?:-?(\d))?/,MR=/(\d{4})-?(\d{3})/,kR=sC("weekYear","weekNumber","weekDay"),PR=sC("year","ordinal"),IR=/(\d{4})-(\d\d)-(\d\d)/,uC=RegExp(`${Hg.source} ?(?:${lC.source}|(${aC.source}))?`),LR=RegExp(`(?: ${uC.source})?`);function Wl(e,t,n){const r=e[t];return Ht(r)?n:$a(r)}function FR(e,t){return[{year:Wl(e,t),month:Wl(e,t+1,1),day:Wl(e,t+2,1)},null,t+3]}function nc(e,t){return[{hours:Wl(e,t,0),minutes:Wl(e,t+1,0),seconds:Wl(e,t+2,0),milliseconds:jg(e[t+3])},null,t+4]}function ku(e,t){const n=!e[t]&&!e[t+1],r=Df(e[t+1],e[t+2]),o=n?null:Lr.instance(r);return[{},o,t+3]}function Pu(e,t){const n=e[t]?qi.create(e[t]):null;return[{},n,t+1]}const jR=RegExp(`^T?${Hg.source}$`),BR=/^-?P(?:(?:(-?\d{1,20}(?:\.\d{1,20})?)Y)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20}(?:\.\d{1,20})?)W)?(?:(-?\d{1,20}(?:\.\d{1,20})?)D)?(?:T(?:(-?\d{1,20}(?:\.\d{1,20})?)H)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,20}))?S)?)?)$/;function HR(e){const[t,n,r,o,i,a,l,u,p]=e,m=t[0]==="-",_=u&&u[0]==="-",v=(C,b=!1)=>C!==void 0&&(b||C&&m)?-C:C;return[{years:v(gs(n)),months:v(gs(r)),weeks:v(gs(o)),days:v(gs(i)),hours:v(gs(a)),minutes:v(gs(l)),seconds:v(gs(u),u==="-0"),milliseconds:v(jg(p),_)}]}const WR={GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function zg(e,t,n,r,o,i,a){const l={year:t.length===2?Gp($a(t)):$a(t),month:QE.indexOf(n)+1,day:$a(r),hour:$a(o),minute:$a(i)};return a&&(l.second=$a(a)),e&&(l.weekday=e.length>3?tC.indexOf(e)+1:nC.indexOf(e)+1),l}const zR=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function KR(e){const[,t,n,r,o,i,a,l,u,p,m,_]=e,v=zg(t,o,r,n,i,a,l);let C;return u?C=WR[u]:p?C=0:C=Df(m,_),[v,new Lr(C)]}function GR(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const UR=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,VR=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,YR=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function tb(e){const[,t,n,r,o,i,a,l]=e;return[zg(t,o,r,n,i,a,l),Lr.utcInstance]}function qR(e){const[,t,n,r,o,i,a,l]=e;return[zg(t,l,n,r,o,i,a),Lr.utcInstance]}const ZR=Ql($R,Wg),JR=Ql(DR,Wg),XR=Ql(MR,Wg),QR=Ql(cC),dC=ec(FR,nc,ku,Pu),e$=ec(kR,nc,ku,Pu),t$=ec(PR,nc,ku,Pu),n$=ec(nc,ku,Pu);function r$(e){return tc(e,[ZR,dC],[JR,e$],[XR,t$],[QR,n$])}function o$(e){return tc(GR(e),[zR,KR])}function i$(e){return tc(e,[UR,tb],[VR,tb],[YR,qR])}function a$(e){return tc(e,[BR,HR])}const s$=ec(nc);function l$(e){return tc(e,[jR,s$])}const c$=Ql(IR,LR),u$=Ql(uC),d$=ec(nc,ku,Pu);function f$(e){return tc(e,[c$,dC],[u$,d$])}const nb="Invalid Duration",fC={weeks:{days:7,hours:7*24,minutes:7*24*60,seconds:7*24*60*60,milliseconds:7*24*60*60*1e3},days:{hours:24,minutes:24*60,seconds:24*60*60,milliseconds:24*60*60*1e3},hours:{minutes:60,seconds:60*60,milliseconds:60*60*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},h$={years:{quarters:4,months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:91*24,minutes:91*24*60,seconds:91*24*60*60,milliseconds:91*24*60*60*1e3},months:{weeks:4,days:30,hours:30*24,minutes:30*24*60,seconds:30*24*60*60,milliseconds:30*24*60*60*1e3},...fC},mo=146097/400,gl=146097/4800,p$={years:{quarters:4,months:12,weeks:mo/7,days:mo,hours:mo*24,minutes:mo*24*60,seconds:mo*24*60*60,milliseconds:mo*24*60*60*1e3},quarters:{months:3,weeks:mo/28,days:mo/4,hours:mo*24/4,minutes:mo*24*60/4,seconds:mo*24*60*60/4,milliseconds:mo*24*60*60*1e3/4},months:{weeks:gl/7,days:gl,hours:gl*24,minutes:gl*24*60,seconds:gl*24*60*60,milliseconds:gl*24*60*60*1e3},...fC},_s=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],g$=_s.slice(0).reverse();function Sa(e,t,n=!1){const r={values:n?t.values:{...e.values,...t.values||{}},loc:e.loc.clone(t.loc),conversionAccuracy:t.conversionAccuracy||e.conversionAccuracy,matrix:t.matrix||e.matrix};return new rn(r)}function hC(e,t){let n=t.milliseconds??0;for(const r of g$.slice(1))t[r]&&(n+=t[r]*e[r].milliseconds);return n}function rb(e,t){const n=hC(e,t)<0?-1:1;_s.reduceRight((r,o)=>{if(Ht(t[o]))return r;if(r){const i=t[r]*n,a=e[o][r],l=Math.floor(i/a);t[o]+=l*n,t[r]-=l*a*n}return o},null),_s.reduce((r,o)=>{if(Ht(t[o]))return r;if(r){const i=t[r]%1;t[r]-=i,t[o]+=i*e[r][o]}return o},null)}function m$(e){const t={};for(const[n,r]of Object.entries(e))r!==0&&(t[n]=r);return t}class rn{constructor(t){const n=t.conversionAccuracy==="longterm"||!1;let r=n?p$:h$;t.matrix&&(r=t.matrix),this.values=t.values,this.loc=t.loc||Ln.create(),this.conversionAccuracy=n?"longterm":"casual",this.invalid=t.invalid||null,this.matrix=r,this.isLuxonDuration=!0}static fromMillis(t,n){return rn.fromObject({milliseconds:t},n)}static fromObject(t,n={}){if(t==null||typeof t!="object")throw new Wr(`Duration.fromObject: argument expected to be an object, got ${t===null?"null":typeof t}`);return new rn({values:uf(t,rn.normalizeUnit),loc:Ln.fromObject(n),conversionAccuracy:n.conversionAccuracy,matrix:n.matrix})}static fromDurationLike(t){if(Es(t))return rn.fromMillis(t);if(rn.isDuration(t))return t;if(typeof t=="object")return rn.fromObject(t);throw new Wr(`Unknown duration argument ${t} of type ${typeof t}`)}static fromISO(t,n){const[r]=a$(t);return r?rn.fromObject(r,n):rn.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static fromISOTime(t,n){const[r]=l$(t);return r?rn.fromObject(r,n):rn.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static invalid(t,n=null){if(!t)throw new Wr("need to specify a reason the Duration is invalid");const r=t instanceof jo?t:new jo(t,n);if(qn.throwOnInvalid)throw new zA(r);return new rn({invalid:r})}static normalizeUnit(t){const n={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[t&&t.toLowerCase()];if(!n)throw new CE(t);return n}static isDuration(t){return t&&t.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(t,n={}){const r={...n,floor:n.round!==!1&&n.floor!==!1};return this.isValid?$r.create(this.loc,r).formatDurationFromString(this,t):nb}toHuman(t={}){if(!this.isValid)return nb;const n=_s.map(r=>{const o=this.values[r];return Ht(o)?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...t,unit:r.slice(0,-1)}).format(o)}).filter(r=>r);return this.loc.listFormatter({type:"conjunction",style:t.listStyle||"narrow",...t}).format(n)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let t="P";return this.years!==0&&(t+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(t+=this.months+this.quarters*3+"M"),this.weeks!==0&&(t+=this.weeks+"W"),this.days!==0&&(t+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(t+="T"),this.hours!==0&&(t+=this.hours+"H"),this.minutes!==0&&(t+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(t+=Bg(this.seconds+this.milliseconds/1e3,3)+"S"),t==="P"&&(t+="T0S"),t}toISOTime(t={}){if(!this.isValid)return null;const n=this.toMillis();return n<0||n>=864e5?null:(t={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...t,includeOffset:!1},Cn.fromMillis(n,{zone:"UTC"}).toISOTime(t))}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Duration { values: ${JSON.stringify(this.values)} }`:`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){return this.isValid?hC(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(t){if(!this.isValid)return this;const n=rn.fromDurationLike(t),r={};for(const o of _s)(Vl(n.values,o)||Vl(this.values,o))&&(r[o]=n.get(o)+this.get(o));return Sa(this,{values:r},!0)}minus(t){if(!this.isValid)return this;const n=rn.fromDurationLike(t);return this.plus(n.negate())}mapUnits(t){if(!this.isValid)return this;const n={};for(const r of Object.keys(this.values))n[r]=XE(t(this.values[r],r));return Sa(this,{values:n},!0)}get(t){return this[rn.normalizeUnit(t)]}set(t){if(!this.isValid)return this;const n={...this.values,...uf(t,rn.normalizeUnit)};return Sa(this,{values:n})}reconfigure({locale:t,numberingSystem:n,conversionAccuracy:r,matrix:o}={}){const i={loc:this.loc.clone({locale:t,numberingSystem:n}),matrix:o,conversionAccuracy:r};return Sa(this,i)}as(t){return this.isValid?this.shiftTo(t).get(t):NaN}normalize(){if(!this.isValid)return this;const t=this.toObject();return rb(this.matrix,t),Sa(this,{values:t},!0)}rescale(){if(!this.isValid)return this;const t=m$(this.normalize().shiftToAll().toObject());return Sa(this,{values:t},!0)}shiftTo(...t){if(!this.isValid)return this;if(t.length===0)return this;t=t.map(a=>rn.normalizeUnit(a));const n={},r={},o=this.toObject();let i;for(const a of _s)if(t.indexOf(a)>=0){i=a;let l=0;for(const p in r)l+=this.matrix[p][a]*r[p],r[p]=0;Es(o[a])&&(l+=o[a]);const u=Math.trunc(l);n[a]=u,r[a]=(l*1e3-u*1e3)/1e3}else Es(o[a])&&(r[a]=o[a]);for(const a in r)r[a]!==0&&(n[i]+=a===i?r[a]:r[a]/this.matrix[i][a]);return rb(this.matrix,n),Sa(this,{values:n},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;const t={};for(const n of Object.keys(this.values))t[n]=this.values[n]===0?0:-this.values[n];return Sa(this,{values:t},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(t){if(!this.isValid||!t.isValid||!this.loc.equals(t.loc))return!1;function n(r,o){return r===void 0||r===0?o===void 0||o===0:r===o}for(const r of _s)if(!n(this.values[r],t.values[r]))return!1;return!0}}const ml="Invalid Interval";function v$(e,t){return!e||!e.isValid?Gn.invalid("missing or invalid start"):!t||!t.isValid?Gn.invalid("missing or invalid end"):t<e?Gn.invalid("end before start",`The end of an interval must be after its start, but you had start=${e.toISO()} and end=${t.toISO()}`):null}class Gn{constructor(t){this.s=t.start,this.e=t.end,this.invalid=t.invalid||null,this.isLuxonInterval=!0}static invalid(t,n=null){if(!t)throw new Wr("need to specify a reason the Interval is invalid");const r=t instanceof jo?t:new jo(t,n);if(qn.throwOnInvalid)throw new WA(r);return new Gn({invalid:r})}static fromDateTimes(t,n){const r=au(t),o=au(n);return v$(r,o)??new Gn({start:r,end:o})}static after(t,n){const r=rn.fromDurationLike(n),o=au(t);return Gn.fromDateTimes(o,o.plus(r))}static before(t,n){const r=rn.fromDurationLike(n),o=au(t);return Gn.fromDateTimes(o.minus(r),o)}static fromISO(t,n){const[r,o]=(t||"").split("/",2);if(r&&o){let i,a;try{i=Cn.fromISO(r,n),a=i.isValid}catch{a=!1}let l,u;try{l=Cn.fromISO(o,n),u=l.isValid}catch{u=!1}if(a&&u)return Gn.fromDateTimes(i,l);if(a){const p=rn.fromISO(o,n);if(p.isValid)return Gn.after(i,p)}else if(u){const p=rn.fromISO(r,n);if(p.isValid)return Gn.before(l,p)}}return Gn.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static isInterval(t){return t&&t.isLuxonInterval||!1}get start(){return this.isValid?this.s:null}get end(){return this.isValid?this.e:null}get isValid(){return this.invalidReason===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}length(t="milliseconds"){return this.isValid?this.toDuration(t).get(t):NaN}count(t="milliseconds",n){if(!this.isValid)return NaN;const r=this.start.startOf(t,n);let o;return n!=null&&n.useLocaleWeeks?o=this.end.reconfigure({locale:r.locale}):o=this.end,o=o.startOf(t,n),Math.floor(o.diff(r,t).get(t))+(o.valueOf()!==this.end.valueOf())}hasSame(t){return this.isValid?this.isEmpty()||this.e.minus(1).hasSame(this.s,t):!1}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(t){return this.isValid?this.s>t:!1}isBefore(t){return this.isValid?this.e<=t:!1}contains(t){return this.isValid?this.s<=t&&this.e>t:!1}set({start:t,end:n}={}){return this.isValid?Gn.fromDateTimes(t||this.s,n||this.e):this}splitAt(...t){if(!this.isValid)return[];const n=t.map(au).filter(a=>this.contains(a)).sort((a,l)=>a.toMillis()-l.toMillis()),r=[];let{s:o}=this,i=0;for(;o<this.e;){const a=n[i]||this.e,l=+a>+this.e?this.e:a;r.push(Gn.fromDateTimes(o,l)),o=l,i+=1}return r}splitBy(t){const n=rn.fromDurationLike(t);if(!this.isValid||!n.isValid||n.as("milliseconds")===0)return[];let{s:r}=this,o=1,i;const a=[];for(;r<this.e;){const l=this.start.plus(n.mapUnits(u=>u*o));i=+l>+this.e?this.e:l,a.push(Gn.fromDateTimes(r,i)),r=i,o+=1}return a}divideEqually(t){return this.isValid?this.splitBy(this.length()/t).slice(0,t):[]}overlaps(t){return this.e>t.s&&this.s<t.e}abutsStart(t){return this.isValid?+this.e==+t.s:!1}abutsEnd(t){return this.isValid?+t.e==+this.s:!1}engulfs(t){return this.isValid?this.s<=t.s&&this.e>=t.e:!1}equals(t){return!this.isValid||!t.isValid?!1:this.s.equals(t.s)&&this.e.equals(t.e)}intersection(t){if(!this.isValid)return this;const n=this.s>t.s?this.s:t.s,r=this.e<t.e?this.e:t.e;return n>=r?null:Gn.fromDateTimes(n,r)}union(t){if(!this.isValid)return this;const n=this.s<t.s?this.s:t.s,r=this.e>t.e?this.e:t.e;return Gn.fromDateTimes(n,r)}static merge(t){const[n,r]=t.sort((o,i)=>o.s-i.s).reduce(([o,i],a)=>i?i.overlaps(a)||i.abutsStart(a)?[o,i.union(a)]:[o.concat([i]),a]:[o,a],[[],null]);return r&&n.push(r),n}static xor(t){let n=null,r=0;const o=[],i=t.map(u=>[{time:u.s,type:"s"},{time:u.e,type:"e"}]),a=Array.prototype.concat(...i),l=a.sort((u,p)=>u.time-p.time);for(const u of l)r+=u.type==="s"?1:-1,r===1?n=u.time:(n&&+n!=+u.time&&o.push(Gn.fromDateTimes(n,u.time)),n=null);return Gn.merge(o)}difference(...t){return Gn.xor([this].concat(t)).map(n=>this.intersection(n)).filter(n=>n&&!n.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:ml}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(t=sf,n={}){return this.isValid?$r.create(this.s.loc.clone(n),t).formatInterval(this):ml}toISO(t){return this.isValid?`${this.s.toISO(t)}/${this.e.toISO(t)}`:ml}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:ml}toISOTime(t){return this.isValid?`${this.s.toISOTime(t)}/${this.e.toISOTime(t)}`:ml}toFormat(t,{separator:n=" – "}={}){return this.isValid?`${this.s.toFormat(t)}${n}${this.e.toFormat(t)}`:ml}toDuration(t,n){return this.isValid?this.e.diff(this.s,t,n):rn.invalid(this.invalidReason)}mapEndpoints(t){return Gn.fromDateTimes(t(this.s),t(this.e))}}class Dd{static hasDST(t=qn.defaultZone){const n=Cn.now().setZone(t).set({month:12});return!t.isUniversal&&n.offset!==n.set({month:6}).offset}static isValidIANAZone(t){return qi.isValidZone(t)}static normalizeZone(t){return Ma(t,qn.defaultZone)}static getStartOfWeek({locale:t=null,locObj:n=null}={}){return(n||Ln.create(t)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:t=null,locObj:n=null}={}){return(n||Ln.create(t)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:t=null,locObj:n=null}={}){return(n||Ln.create(t)).getWeekendDays().slice()}static months(t="long",{locale:n=null,numberingSystem:r=null,locObj:o=null,outputCalendar:i="gregory"}={}){return(o||Ln.create(n,r,i)).months(t)}static monthsFormat(t="long",{locale:n=null,numberingSystem:r=null,locObj:o=null,outputCalendar:i="gregory"}={}){return(o||Ln.create(n,r,i)).months(t,!0)}static weekdays(t="long",{locale:n=null,numberingSystem:r=null,locObj:o=null}={}){return(o||Ln.create(n,r,null)).weekdays(t)}static weekdaysFormat(t="long",{locale:n=null,numberingSystem:r=null,locObj:o=null}={}){return(o||Ln.create(n,r,null)).weekdays(t,!0)}static meridiems({locale:t=null}={}){return Ln.create(t).meridiems()}static eras(t="short",{locale:n=null}={}){return Ln.create(n,null,"gregory").eras(t)}static features(){return{relative:qE(),localeWeek:ZE()}}}function ob(e,t){const n=o=>o.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),r=n(t)-n(e);return Math.floor(rn.fromMillis(r).as("days"))}function y$(e,t,n){const r=[["years",(u,p)=>p.year-u.year],["quarters",(u,p)=>p.quarter-u.quarter+(p.year-u.year)*4],["months",(u,p)=>p.month-u.month+(p.year-u.year)*12],["weeks",(u,p)=>{const m=ob(u,p);return(m-m%7)/7}],["days",ob]],o={},i=e;let a,l;for(const[u,p]of r)n.indexOf(u)>=0&&(a=u,o[u]=p(e,t),l=i.plus(o),l>t?(o[u]--,e=i.plus(o),e>t&&(l=e,o[u]--,e=i.plus(o))):e=l);return[e,o,l,a]}function b$(e,t,n,r){let[o,i,a,l]=y$(e,t,n);const u=t-o,p=n.filter(_=>["hours","minutes","seconds","milliseconds"].indexOf(_)>=0);p.length===0&&(a<t&&(a=o.plus({[l]:1})),a!==o&&(i[l]=(i[l]||0)+u/(a-o)));const m=rn.fromObject(i,r);return p.length>0?rn.fromMillis(u,r).shiftTo(...p).plus(m):m}const Kg={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},ib={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},_$=Kg.hanidec.replace(/[\[|\]]/g,"").split("");function x$(e){let t=parseInt(e,10);if(isNaN(t)){t="";for(let n=0;n<e.length;n++){const r=e.charCodeAt(n);if(e[n].search(Kg.hanidec)!==-1)t+=_$.indexOf(e[n]);else for(const o in ib){const[i,a]=ib[o];r>=i&&r<=a&&(t+=r-i)}}return parseInt(t,10)}else return t}function Io({numberingSystem:e},t=""){return new RegExp(`${Kg[e||"latn"]}${t}`)}const E$="missing Intl.DateTimeFormat.formatToParts support";function sn(e,t=n=>n){return{regex:e,deser:([n])=>t(x$(n))}}const C$=" ",pC=`[ ${C$}]`,gC=new RegExp(pC,"g");function w$(e){return e.replace(/\./g,"\\.?").replace(gC,pC)}function ab(e){return e.replace(/\./g,"").replace(gC," ").toLowerCase()}function Lo(e,t){return e===null?null:{regex:RegExp(e.map(w$).join("|")),deser:([n])=>e.findIndex(r=>ab(n)===ab(r))+t}}function sb(e,t){return{regex:e,deser:([,n,r])=>Df(n,r),groups:t}}function Md(e){return{regex:e,deser:([t])=>t}}function N$(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function T$(e,t){const n=Io(t),r=Io(t,"{2}"),o=Io(t,"{3}"),i=Io(t,"{4}"),a=Io(t,"{6}"),l=Io(t,"{1,2}"),u=Io(t,"{1,3}"),p=Io(t,"{1,6}"),m=Io(t,"{1,9}"),_=Io(t,"{2,4}"),v=Io(t,"{4,6}"),C=y=>({regex:RegExp(N$(y.val)),deser:([N])=>N,literal:!0}),b=(y=>{if(e.literal)return C(y);switch(y.val){case"G":return Lo(t.eras("short"),0);case"GG":return Lo(t.eras("long"),0);case"y":return sn(p);case"yy":return sn(_,Gp);case"yyyy":return sn(i);case"yyyyy":return sn(v);case"yyyyyy":return sn(a);case"M":return sn(l);case"MM":return sn(r);case"MMM":return Lo(t.months("short",!0),1);case"MMMM":return Lo(t.months("long",!0),1);case"L":return sn(l);case"LL":return sn(r);case"LLL":return Lo(t.months("short",!1),1);case"LLLL":return Lo(t.months("long",!1),1);case"d":return sn(l);case"dd":return sn(r);case"o":return sn(u);case"ooo":return sn(o);case"HH":return sn(r);case"H":return sn(l);case"hh":return sn(r);case"h":return sn(l);case"mm":return sn(r);case"m":return sn(l);case"q":return sn(l);case"qq":return sn(r);case"s":return sn(l);case"ss":return sn(r);case"S":return sn(u);case"SSS":return sn(o);case"u":return Md(m);case"uu":return Md(l);case"uuu":return sn(n);case"a":return Lo(t.meridiems(),0);case"kkkk":return sn(i);case"kk":return sn(_,Gp);case"W":return sn(l);case"WW":return sn(r);case"E":case"c":return sn(n);case"EEE":return Lo(t.weekdays("short",!1),1);case"EEEE":return Lo(t.weekdays("long",!1),1);case"ccc":return Lo(t.weekdays("short",!0),1);case"cccc":return Lo(t.weekdays("long",!0),1);case"Z":case"ZZ":return sb(new RegExp(`([+-]${l.source})(?::(${r.source}))?`),2);case"ZZZ":return sb(new RegExp(`([+-]${l.source})(${r.source})?`),2);case"z":return Md(/[a-z_+-/]{1,256}?/i);case" ":return Md(/[^\S\n\r]/);default:return C(y)}})(e)||{invalidReason:E$};return b.token=e,b}const S$={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour12:{numeric:"h","2-digit":"hh"},hour24:{numeric:"H","2-digit":"HH"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};function O$(e,t,n){const{type:r,value:o}=e;if(r==="literal"){const u=/^\s+$/.test(o);return{literal:!u,val:u?" ":o}}const i=t[r];let a=r;r==="hour"&&(t.hour12!=null?a=t.hour12?"hour12":"hour24":t.hourCycle!=null?t.hourCycle==="h11"||t.hourCycle==="h12"?a="hour12":a="hour24":a=n.hour12?"hour12":"hour24");let l=S$[a];if(typeof l=="object"&&(l=l[i]),l)return{literal:!1,val:l}}function A$(e){return[`^${e.map(t=>t.regex).reduce((t,n)=>`${t}(${n.source})`,"")}$`,e]}function R$(e,t,n){const r=e.match(t);if(r){const o={};let i=1;for(const a in n)if(Vl(n,a)){const l=n[a],u=l.groups?l.groups+1:1;!l.literal&&l.token&&(o[l.token.val[0]]=l.deser(r.slice(i,i+u))),i+=u}return[r,o]}else return[r,{}]}function $$(e){const t=o=>{switch(o){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}};let n=null,r;return Ht(e.z)||(n=qi.create(e.z)),Ht(e.Z)||(n||(n=new Lr(e.Z)),r=e.Z),Ht(e.q)||(e.M=(e.q-1)*3+1),Ht(e.h)||(e.h<12&&e.a===1?e.h+=12:e.h===12&&e.a===0&&(e.h=0)),e.G===0&&e.y&&(e.y=-e.y),Ht(e.u)||(e.S=jg(e.u)),[Object.keys(e).reduce((o,i)=>{const a=t(i);return a&&(o[a]=e[i]),o},{}),n,r]}let Qh=null;function D$(){return Qh||(Qh=Cn.fromMillis(1555555555555)),Qh}function M$(e,t){if(e.literal)return e;const n=$r.macroTokenToFormatOpts(e.val),r=yC(n,t);return r==null||r.includes(void 0)?e:r}function mC(e,t){return Array.prototype.concat(...e.map(n=>M$(n,t)))}function vC(e,t,n){const r=mC($r.parseFormat(n),e),o=r.map(a=>T$(a,e)),i=o.find(a=>a.invalidReason);if(i)return{input:t,tokens:r,invalidReason:i.invalidReason};{const[a,l]=A$(o),u=RegExp(a,"i"),[p,m]=R$(t,u,l),[_,v,C]=m?$$(m):[null,null,void 0];if(Vl(m,"a")&&Vl(m,"H"))throw new Fl("Can't include meridiem when specifying 24-hour format");return{input:t,tokens:r,regex:u,rawMatches:p,matches:m,result:_,zone:v,specificOffset:C}}}function k$(e,t,n){const{result:r,zone:o,specificOffset:i,invalidReason:a}=vC(e,t,n);return[r,o,i,a]}function yC(e,t){if(!e)return null;const n=$r.create(t,e).dtFormatter(D$()),r=n.formatToParts(),o=n.resolvedOptions();return r.map(i=>O$(i,e,o))}const ep="Invalid DateTime",lb=864e13;function kd(e){return new jo("unsupported zone",`the zone "${e.name}" is not supported`)}function tp(e){return e.weekData===null&&(e.weekData=lf(e.c)),e.weekData}function np(e){return e.localWeekData===null&&(e.localWeekData=lf(e.c,e.loc.getMinDaysInFirstWeek(),e.loc.getStartOfWeek())),e.localWeekData}function ms(e,t){const n={ts:e.ts,zone:e.zone,c:e.c,o:e.o,loc:e.loc,invalid:e.invalid};return new Cn({...n,...t,old:n})}function bC(e,t,n){let r=e-t*60*1e3;const o=n.offset(r);if(t===o)return[r,t];r-=(o-t)*60*1e3;const i=n.offset(r);return o===i?[r,o]:[e-Math.min(o,i)*60*1e3,Math.max(o,i)]}function Pd(e,t){e+=t*60*1e3;const n=new Date(e);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),minute:n.getUTCMinutes(),second:n.getUTCSeconds(),millisecond:n.getUTCMilliseconds()}}function ef(e,t,n){return bC($f(e),t,n)}function cb(e,t){const n=e.o,r=e.c.year+Math.trunc(t.years),o=e.c.month+Math.trunc(t.months)+Math.trunc(t.quarters)*3,i={...e.c,year:r,month:o,day:Math.min(e.c.day,cf(r,o))+Math.trunc(t.days)+Math.trunc(t.weeks)*7},a=rn.fromObject({years:t.years-Math.trunc(t.years),quarters:t.quarters-Math.trunc(t.quarters),months:t.months-Math.trunc(t.months),weeks:t.weeks-Math.trunc(t.weeks),days:t.days-Math.trunc(t.days),hours:t.hours,minutes:t.minutes,seconds:t.seconds,milliseconds:t.milliseconds}).as("milliseconds"),l=$f(i);let[u,p]=bC(l,n,e.zone);return a!==0&&(u+=a,p=e.zone.offset(u)),{ts:u,o:p}}function iu(e,t,n,r,o,i){const{setZone:a,zone:l}=n;if(e&&Object.keys(e).length!==0||t){const u=t||l,p=Cn.fromObject(e,{...n,zone:u,specificOffset:i});return a?p:p.setZone(l)}else return Cn.invalid(new jo("unparsable",`the input "${o}" can't be parsed as ${r}`))}function Id(e,t,n=!0){return e.isValid?$r.create(Ln.create("en-US"),{allowZ:n,forceSimple:!0}).formatDateTimeFromString(e,t):null}function rp(e,t){const n=e.c.year>9999||e.c.year<0;let r="";return n&&e.c.year>=0&&(r+="+"),r+=Qn(e.c.year,n?6:4),t?(r+="-",r+=Qn(e.c.month),r+="-",r+=Qn(e.c.day)):(r+=Qn(e.c.month),r+=Qn(e.c.day)),r}function ub(e,t,n,r,o,i){let a=Qn(e.c.hour);return t?(a+=":",a+=Qn(e.c.minute),(e.c.millisecond!==0||e.c.second!==0||!n)&&(a+=":")):a+=Qn(e.c.minute),(e.c.millisecond!==0||e.c.second!==0||!n)&&(a+=Qn(e.c.second),(e.c.millisecond!==0||!r)&&(a+=".",a+=Qn(e.c.millisecond,3))),o&&(e.isOffsetFixed&&e.offset===0&&!i?a+="Z":e.o<0?(a+="-",a+=Qn(Math.trunc(-e.o/60)),a+=":",a+=Qn(Math.trunc(-e.o%60))):(a+="+",a+=Qn(Math.trunc(e.o/60)),a+=":",a+=Qn(Math.trunc(e.o%60)))),i&&(a+="["+e.zone.ianaName+"]"),a}const _C={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},P$={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},I$={ordinal:1,hour:0,minute:0,second:0,millisecond:0},xC=["year","month","day","hour","minute","second","millisecond"],L$=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],F$=["year","ordinal","hour","minute","second","millisecond"];function j$(e){const t={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[e.toLowerCase()];if(!t)throw new CE(e);return t}function db(e){switch(e.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return j$(e)}}function fb(e,t){const n=Ma(t.zone,qn.defaultZone),r=Ln.fromObject(t),o=qn.now();let i,a;if(Ht(e.year))i=o;else{for(const p of xC)Ht(e[p])&&(e[p]=_C[p]);const l=VE(e)||YE(e);if(l)return Cn.invalid(l);const u=n.offset(o);[i,a]=ef(e,u,n)}return new Cn({ts:i,zone:n,loc:r,o:a})}function hb(e,t,n){const r=Ht(n.round)?!0:n.round,o=(a,l)=>(a=Bg(a,r||n.calendary?0:2,!0),t.loc.clone(n).relFormatter(n).format(a,l)),i=a=>n.calendary?t.hasSame(e,a)?0:t.startOf(a).diff(e.startOf(a),a).get(a):t.diff(e,a).get(a);if(n.unit)return o(i(n.unit),n.unit);for(const a of n.units){const l=i(a);if(Math.abs(l)>=1)return o(l,a)}return o(e>t?-0:0,n.units[n.units.length-1])}function pb(e){let t={},n;return e.length>0&&typeof e[e.length-1]=="object"?(t=e[e.length-1],n=Array.from(e).slice(0,e.length-1)):n=Array.from(e),[t,n]}let Cn=class Kn{constructor(t){const n=t.zone||qn.defaultZone;let r=t.invalid||(Number.isNaN(t.ts)?new jo("invalid input"):null)||(n.isValid?null:kd(n));this.ts=Ht(t.ts)?qn.now():t.ts;let o=null,i=null;if(!r)if(t.old&&t.old.ts===this.ts&&t.old.zone.equals(n))[o,i]=[t.old.c,t.old.o];else{const a=n.offset(this.ts);o=Pd(this.ts,a),r=Number.isNaN(o.year)?new jo("invalid input"):null,o=r?null:o,i=r?null:a}this._zone=n,this.loc=t.loc||Ln.create(),this.invalid=r,this.weekData=null,this.localWeekData=null,this.c=o,this.o=i,this.isLuxonDateTime=!0}static now(){return new Kn({})}static local(){const[t,n]=pb(arguments),[r,o,i,a,l,u,p]=n;return fb({year:r,month:o,day:i,hour:a,minute:l,second:u,millisecond:p},t)}static utc(){const[t,n]=pb(arguments),[r,o,i,a,l,u,p]=n;return t.zone=Lr.utcInstance,fb({year:r,month:o,day:i,hour:a,minute:l,second:u,millisecond:p},t)}static fromJSDate(t,n={}){const r=pR(t)?t.valueOf():NaN;if(Number.isNaN(r))return Kn.invalid("invalid input");const o=Ma(n.zone,qn.defaultZone);return o.isValid?new Kn({ts:r,zone:o,loc:Ln.fromObject(n)}):Kn.invalid(kd(o))}static fromMillis(t,n={}){if(Es(t))return t<-lb||t>lb?Kn.invalid("Timestamp out of range"):new Kn({ts:t,zone:Ma(n.zone,qn.defaultZone),loc:Ln.fromObject(n)});throw new Wr(`fromMillis requires a numerical input, but received a ${typeof t} with value ${t}`)}static fromSeconds(t,n={}){if(Es(t))return new Kn({ts:t*1e3,zone:Ma(n.zone,qn.defaultZone),loc:Ln.fromObject(n)});throw new Wr("fromSeconds requires a numerical input")}static fromObject(t,n={}){t=t||{};const r=Ma(n.zone,qn.defaultZone);if(!r.isValid)return Kn.invalid(kd(r));const o=Ln.fromObject(n),i=uf(t,db),{minDaysInFirstWeek:a,startOfWeek:l}=J0(i,o),u=qn.now(),p=Ht(n.specificOffset)?r.offset(u):n.specificOffset,m=!Ht(i.ordinal),_=!Ht(i.year),v=!Ht(i.month)||!Ht(i.day),C=_||v,b=i.weekYear||i.weekNumber;if((C||m)&&b)throw new Fl("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(v&&m)throw new Fl("Can't mix ordinal dates with month/day");const y=b||i.weekday&&!C;let N,R,O=Pd(u,p);y?(N=L$,R=P$,O=lf(O,a,l)):m?(N=F$,R=I$,O=Xh(O)):(N=xC,R=_C);let k=!1;for(const U of N){const J=i[U];Ht(J)?k?i[U]=R[U]:i[U]=O[U]:k=!0}const I=y?dR(i,a,l):m?fR(i):VE(i),M=I||YE(i);if(M)return Kn.invalid(M);const Y=y?q0(i,a,l):m?Z0(i):i,[ee,re]=ef(Y,p,r),Z=new Kn({ts:ee,zone:r,o:re,loc:o});return i.weekday&&C&&t.weekday!==Z.weekday?Kn.invalid("mismatched weekday",`you can't specify both a weekday of ${i.weekday} and a date of ${Z.toISO()}`):Z}static fromISO(t,n={}){const[r,o]=r$(t);return iu(r,o,n,"ISO 8601",t)}static fromRFC2822(t,n={}){const[r,o]=o$(t);return iu(r,o,n,"RFC 2822",t)}static fromHTTP(t,n={}){const[r,o]=i$(t);return iu(r,o,n,"HTTP",n)}static fromFormat(t,n,r={}){if(Ht(t)||Ht(n))throw new Wr("fromFormat requires an input string and a format");const{locale:o=null,numberingSystem:i=null}=r,a=Ln.fromOpts({locale:o,numberingSystem:i,defaultToEN:!0}),[l,u,p,m]=k$(a,t,n);return m?Kn.invalid(m):iu(l,u,r,`format ${n}`,t,p)}static fromString(t,n,r={}){return Kn.fromFormat(t,n,r)}static fromSQL(t,n={}){const[r,o]=f$(t);return iu(r,o,n,"SQL",t)}static invalid(t,n=null){if(!t)throw new Wr("need to specify a reason the DateTime is invalid");const r=t instanceof jo?t:new jo(t,n);if(qn.throwOnInvalid)throw new HA(r);return new Kn({invalid:r})}static isDateTime(t){return t&&t.isLuxonDateTime||!1}static parseFormatForOpts(t,n={}){const r=yC(t,Ln.fromObject(n));return r?r.map(o=>o?o.val:null).join(""):null}static expandFormat(t,n={}){return mC($r.parseFormat(t),Ln.fromObject(n)).map(r=>r.val).join("")}get(t){return this[t]}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?tp(this).weekYear:NaN}get weekNumber(){return this.isValid?tp(this).weekNumber:NaN}get weekday(){return this.isValid?tp(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?np(this).weekday:NaN}get localWeekNumber(){return this.isValid?np(this).weekNumber:NaN}get localWeekYear(){return this.isValid?np(this).weekYear:NaN}get ordinal(){return this.isValid?Xh(this.c).ordinal:NaN}get monthShort(){return this.isValid?Dd.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?Dd.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?Dd.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?Dd.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return this.isOffsetFixed?!1:this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];const t=864e5,n=6e4,r=$f(this.c),o=this.zone.offset(r-t),i=this.zone.offset(r+t),a=this.zone.offset(r-o*n),l=this.zone.offset(r-i*n);if(a===l)return[this];const u=r-a*n,p=r-l*n,m=Pd(u,a),_=Pd(p,l);return m.hour===_.hour&&m.minute===_.minute&&m.second===_.second&&m.millisecond===_.millisecond?[ms(this,{ts:u}),ms(this,{ts:p})]:[this]}get isInLeapYear(){return Mu(this.year)}get daysInMonth(){return cf(this.year,this.month)}get daysInYear(){return this.isValid?Hl(this.year):NaN}get weeksInWeekYear(){return this.isValid?Nu(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?Nu(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(t={}){const{locale:n,numberingSystem:r,calendar:o}=$r.create(this.loc.clone(t),t).resolvedOptions(this);return{locale:n,numberingSystem:r,outputCalendar:o}}toUTC(t=0,n={}){return this.setZone(Lr.instance(t),n)}toLocal(){return this.setZone(qn.defaultZone)}setZone(t,{keepLocalTime:n=!1,keepCalendarTime:r=!1}={}){if(t=Ma(t,qn.defaultZone),t.equals(this.zone))return this;if(t.isValid){let o=this.ts;if(n||r){const i=t.offset(this.ts),a=this.toObject();[o]=ef(a,i,t)}return ms(this,{ts:o,zone:t})}else return Kn.invalid(kd(t))}reconfigure({locale:t,numberingSystem:n,outputCalendar:r}={}){const o=this.loc.clone({locale:t,numberingSystem:n,outputCalendar:r});return ms(this,{loc:o})}setLocale(t){return this.reconfigure({locale:t})}set(t){if(!this.isValid)return this;const n=uf(t,db),{minDaysInFirstWeek:r,startOfWeek:o}=J0(n,this.loc),i=!Ht(n.weekYear)||!Ht(n.weekNumber)||!Ht(n.weekday),a=!Ht(n.ordinal),l=!Ht(n.year),u=!Ht(n.month)||!Ht(n.day),p=l||u,m=n.weekYear||n.weekNumber;if((p||a)&&m)throw new Fl("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(u&&a)throw new Fl("Can't mix ordinal dates with month/day");let _;i?_=q0({...lf(this.c,r,o),...n},r,o):Ht(n.ordinal)?(_={...this.toObject(),...n},Ht(n.day)&&(_.day=Math.min(cf(_.year,_.month),_.day))):_=Z0({...Xh(this.c),...n});const[v,C]=ef(_,this.o,this.zone);return ms(this,{ts:v,o:C})}plus(t){if(!this.isValid)return this;const n=rn.fromDurationLike(t);return ms(this,cb(this,n))}minus(t){if(!this.isValid)return this;const n=rn.fromDurationLike(t).negate();return ms(this,cb(this,n))}startOf(t,{useLocaleWeeks:n=!1}={}){if(!this.isValid)return this;const r={},o=rn.normalizeUnit(t);switch(o){case"years":r.month=1;case"quarters":case"months":r.day=1;case"weeks":case"days":r.hour=0;case"hours":r.minute=0;case"minutes":r.second=0;case"seconds":r.millisecond=0;break}if(o==="weeks")if(n){const i=this.loc.getStartOfWeek(),{weekday:a}=this;a<i&&(r.weekNumber=this.weekNumber-1),r.weekday=i}else r.weekday=1;if(o==="quarters"){const i=Math.ceil(this.month/3);r.month=(i-1)*3+1}return this.set(r)}endOf(t,n){return this.isValid?this.plus({[t]:1}).startOf(t,n).minus(1):this}toFormat(t,n={}){return this.isValid?$r.create(this.loc.redefaultToEN(n)).formatDateTimeFromString(this,t):ep}toLocaleString(t=sf,n={}){return this.isValid?$r.create(this.loc.clone(n),t).formatDateTime(this):ep}toLocaleParts(t={}){return this.isValid?$r.create(this.loc.clone(t),t).formatDateTimeParts(this):[]}toISO({format:t="extended",suppressSeconds:n=!1,suppressMilliseconds:r=!1,includeOffset:o=!0,extendedZone:i=!1}={}){if(!this.isValid)return null;const a=t==="extended";let l=rp(this,a);return l+="T",l+=ub(this,a,n,r,o,i),l}toISODate({format:t="extended"}={}){return this.isValid?rp(this,t==="extended"):null}toISOWeekDate(){return Id(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:t=!1,suppressSeconds:n=!1,includeOffset:r=!0,includePrefix:o=!1,extendedZone:i=!1,format:a="extended"}={}){return this.isValid?(o?"T":"")+ub(this,a==="extended",n,t,r,i):null}toRFC2822(){return Id(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return Id(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?rp(this,!0):null}toSQLTime({includeOffset:t=!0,includeZone:n=!1,includeOffsetSpace:r=!0}={}){let o="HH:mm:ss.SSS";return(n||t)&&(r&&(o+=" "),n?o+="z":t&&(o+="ZZ")),Id(this,o,!0)}toSQL(t={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(t)}`:null}toString(){return this.isValid?this.toISO():ep}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }`:`DateTime { Invalid, reason: ${this.invalidReason} }`}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(t={}){if(!this.isValid)return{};const n={...this.c};return t.includeConfig&&(n.outputCalendar=this.outputCalendar,n.numberingSystem=this.loc.numberingSystem,n.locale=this.loc.locale),n}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(t,n="milliseconds",r={}){if(!this.isValid||!t.isValid)return rn.invalid("created by diffing an invalid DateTime");const o={locale:this.locale,numberingSystem:this.numberingSystem,...r},i=gR(n).map(rn.normalizeUnit),a=t.valueOf()>this.valueOf(),l=a?this:t,u=a?t:this,p=b$(l,u,i,o);return a?p.negate():p}diffNow(t="milliseconds",n={}){return this.diff(Kn.now(),t,n)}until(t){return this.isValid?Gn.fromDateTimes(this,t):this}hasSame(t,n,r){if(!this.isValid)return!1;const o=t.valueOf(),i=this.setZone(t.zone,{keepLocalTime:!0});return i.startOf(n,r)<=o&&o<=i.endOf(n,r)}equals(t){return this.isValid&&t.isValid&&this.valueOf()===t.valueOf()&&this.zone.equals(t.zone)&&this.loc.equals(t.loc)}toRelative(t={}){if(!this.isValid)return null;const n=t.base||Kn.fromObject({},{zone:this.zone}),r=t.padding?this<n?-t.padding:t.padding:0;let o=["years","months","days","hours","minutes","seconds"],i=t.unit;return Array.isArray(t.unit)&&(o=t.unit,i=void 0),hb(n,this.plus(r),{...t,numeric:"always",units:o,unit:i})}toRelativeCalendar(t={}){return this.isValid?hb(t.base||Kn.fromObject({},{zone:this.zone}),this,{...t,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...t){if(!t.every(Kn.isDateTime))throw new Wr("min requires all arguments be DateTimes");return X0(t,n=>n.valueOf(),Math.min)}static max(...t){if(!t.every(Kn.isDateTime))throw new Wr("max requires all arguments be DateTimes");return X0(t,n=>n.valueOf(),Math.max)}static fromFormatExplain(t,n,r={}){const{locale:o=null,numberingSystem:i=null}=r,a=Ln.fromOpts({locale:o,numberingSystem:i,defaultToEN:!0});return vC(a,t,n)}static fromStringExplain(t,n,r={}){return Kn.fromFormatExplain(t,n,r)}static get DATE_SHORT(){return sf}static get DATE_MED(){return wE}static get DATE_MED_WITH_WEEKDAY(){return KA}static get DATE_FULL(){return NE}static get DATE_HUGE(){return TE}static get TIME_SIMPLE(){return SE}static get TIME_WITH_SECONDS(){return OE}static get TIME_WITH_SHORT_OFFSET(){return AE}static get TIME_WITH_LONG_OFFSET(){return RE}static get TIME_24_SIMPLE(){return $E}static get TIME_24_WITH_SECONDS(){return DE}static get TIME_24_WITH_SHORT_OFFSET(){return ME}static get TIME_24_WITH_LONG_OFFSET(){return kE}static get DATETIME_SHORT(){return PE}static get DATETIME_SHORT_WITH_SECONDS(){return IE}static get DATETIME_MED(){return LE}static get DATETIME_MED_WITH_SECONDS(){return FE}static get DATETIME_MED_WITH_WEEKDAY(){return GA}static get DATETIME_FULL(){return jE}static get DATETIME_FULL_WITH_SECONDS(){return BE}static get DATETIME_HUGE(){return HE}static get DATETIME_HUGE_WITH_SECONDS(){return WE}};function au(e){if(Cn.isDateTime(e))return e;if(e&&e.valueOf&&Es(e.valueOf()))return Cn.fromJSDate(e);if(e&&typeof e=="object")return Cn.fromObject(e);throw new Wr(`Unknown datetime argument: ${e}, of type ${typeof e}`)}var dn=(e=>(e.Monday="MONDAY",e.Tuesday="TUESDAY",e.Wednesday="WEDNESDAY",e.Thursday="THURSDAY",e.Friday="FRIDAY",e.Saturday="SATURDAY",e.Sunday="SUNDAY",e))(dn||{});function Gg(e){const t={1:dn.Monday,2:dn.Tuesday,3:dn.Wednesday,4:dn.Thursday,5:dn.Friday,6:dn.Saturday,7:dn.Sunday};if(e.weekday in t)return t[e.weekday];throw new Error(`Invalid DateTime.weekday property: ${e}, ${e.weekday}`)}function mi(e){return{[dn.Monday]:"Monday",[dn.Tuesday]:"Tuesday",[dn.Wednesday]:"Wednesday",[dn.Thursday]:"Thursday",[dn.Friday]:"Friday",[dn.Saturday]:"Saturday",[dn.Sunday]:"Sunday"}[e]}class gb{constructor(t,n,r){oo(this,"end"),oo(this,"start"),this.end=t.setZone(r),this.start=t.setZone(r),[n.start,n.end].forEach(u=>{if(u.split(":").length!==2)throw new Error('expected interval start and end data to be in the format "HH:MM"')});const[o,i]=n.start.split(":"),[a,l]=n.end.split(":");this.end=this.end.set({hour:Number(a),minute:Number(l)}),this.start=this.start.set({hour:Number(o),minute:Number(i)}),this.end<this.start&&(this.end=this.end.plus({days:1})),this.end.minute===59&&(this.end=this.end.set({minute:60}))}contains(t){return this.start<=t&&t<this.end}getStartTime(t,n){const r={hour:"numeric",minute:"numeric",...n};return this.start.setLocale(t||"en-US").toLocaleString(r)}getEndTime(t,n){const r={hour:"numeric",minute:"numeric",...n};return this.end.setLocale(t||"en-US").toLocaleString(r)}timeIsEqualTo(t){const n=this.getStartTime()===t.getStartTime(),r=this.getEndTime()===t.getEndTime();return n&&r}is24h(){const t=this.start.minute===0&&this.start.hour===0,n=this.end.minute===0&&this.end.hour===0,r=this.end.day-this.start.day===1||this.end.day===1;return t&&n&&r}}class EC{constructor(t,n){oo(this,"holidayHoursByDate"),oo(this,"hours"),oo(this,"timezone"),this.holidayHoursByDate=Object.fromEntries((t.holidayHours||[]).map(r=>[r.date,r])),this.hours=t,this.timezone=n}getInterval(t){if(this.isTemporarilyClosedAt(t))return null;let n=t;n=n.minus({days:1});for(const r of[n,t]){const o=this.getHours(r);if(o&&!o.isClosed)for(const i of o.openIntervals||[]){const a=new gb(r,i,this.timezone);if(a.contains(t))return a}}return null}getCurrentInterval(){return this.getInterval(Cn.now())}getIntervalAfter(t){const n=this.getIntervalsForNDays(8,t),r=(i,a)=>i.start===a.start?0:i.start>a.start?1:-1,o=n.sort(r);for(const[i,a]of o.entries())if(a.contains(t)&&o.length>i+1)return o[i+1];for(const i of o)if(i.start>t)return i;return null}getIntervalsForNDays(t,n){const r=[];for(let o=0;o<t;o++){let i=n;i=i.plus({days:o});const a=this.getHours(i);a&&!a.isClosed&&r.push(...a.openIntervals.map(l=>new gb(i,l,this.timezone)))}return r}getHolidayHours(t){return this.isTemporarilyClosedAt(t)?null:this.holidayHoursByDate[(t.toISO()||"").replace(/T.*/,"")]||null}getNormalHours(t){if(this.isTemporarilyClosedAt(t))return null;const n=mi(Gg(t)).toLowerCase();return this.hours[n]}getHours(t){const n=this.getHolidayHours(t);return!n||n.isRegularHours?this.getNormalHours(t):n}getNextInterval(){return this.getIntervalAfter(Cn.now())}isHoliday(t){return!!this.getHolidayHours(t)}isTemporarilyClosedAt(t){if(!this.hours.reopenDate)return!1;const n=this.hours.reopenDate.split("-");if(n.length===3){const[r,o,i]=n,a=Cn.fromObject({year:Number(r),month:Number(o),day:Number(i)},{zone:this.timezone});if(t<a)return!0}return!1}isOpenAt(t){return this.isTemporarilyClosedAt(t)?!1:!!this.getInterval(t)}isOpenNow(){return this.isOpenAt(Cn.now())}}function B$(e,t){const n=[...e];return t=t%n.length,n.concat(n.splice(0,n.length-t))}function H$(e,t){if(e.length!==t.length)return!1;for(const[n,r]of e.entries())if(!r.timeIsEqualTo(t[n]))return!1;return!0}function Iu(e){var t,n;return((n=(t=e==null?void 0:e.currentInterval)==null?void 0:t.is24h)==null?void 0:n.call(t))||!1}function Lu(e){return!e.futureInterval}function W$(e){return Iu(e)?an.jsx("span",{className:"HoursStatus-current",children:"Open 24 Hours"}):Lu(e)?an.jsx("span",{className:"HoursStatus-current",children:"Temporarily Closed"}):an.jsx("span",{className:"HoursStatus-current",children:e.isOpen?"Open Now":"Closed"})}function z$(e){return Iu(e)||Lu(e)?null:an.jsx("span",{className:"HoursStatus-separator",children:" • "})}function K$(e){return Iu(e)||Lu(e)?null:an.jsx("span",{className:"HoursStatus-future",children:e.isOpen?"Closes at":"Opens at"})}function G$(e){if(Iu(e)||Lu(e))return null;let t="";if(e.isOpen){const n=e.currentInterval;t+=n?n.getEndTime("en-US",e.timeOptions):""}else{const n=e.futureInterval;t+=n?n.getStartTime("en-US",e.timeOptions):""}return an.jsxs("span",{className:"HoursStatus-time",children:[" ",t]})}function U$(e){var t,n;if(Iu(e)||Lu(e))return null;const r={weekday:"long",...e.dayOptions??{}};let o="";if(e.isOpen){const i=e.currentInterval;o+=((t=i==null?void 0:i.end)==null?void 0:t.setLocale("en-US").toLocaleString(r))||""}else{const i=e.futureInterval;o+=((n=i==null?void 0:i.start)==null?void 0:n.setLocale("en-US").toLocaleString(r))||""}return an.jsxs("span",{className:"HoursStatus-dayOfWeek",children:[" ",o]})}function V$(e,t){const n=e.currentTemplate||W$,r=e.separatorTemplate||z$,o=e.futureTemplate||K$,i=e.timeTemplate||G$,a=e.dayOfWeekTemplate||U$;return an.jsxs("div",{className:Cu("HoursStatus",(t==null?void 0:t.className)||""),children:[n(e),r(e),o(e),i(e),a(e)]})}const Y$=e=>{const[t,n]=z.useState(!1),[r,o]=z.useState(!1);z.useEffect(()=>{o(!0)},[]);const i=e.statusTemplate||V$,a=new EC(e.hours,e.timezone),l=a.isOpenNow(),u=a.getCurrentInterval(),p=a.getNextInterval(),m=(u==null?void 0:u.end)||(p==null?void 0:p.start);if(m&&!t){n(!0);const v=m.toMillis()-Cn.now().toMillis();setTimeout(()=>n(!1),v)}const _={isOpen:l,currentInterval:u,futureInterval:p,...e};return an.jsx(an.Fragment,{children:r&&i(_,e)})};function q$(e,t){const n=[];return e.forEach(r=>{const o=n[n.length-1];o?H$(o.intervals,r.intervals)?(o.endDay=r.endDay,o.isToday=o.isToday||r.isToday):n.push({...r}):n.push({...r})}),n.map(r=>{const o=t&&mi(r.startDay)in t?t[mi(r.startDay)]||"":mi(r.startDay),i=t&&mi(r.endDay)in t?t[mi(r.endDay)]||"":mi(r.endDay);return{...r,dayOfWeek:"Collapsed",dayName:r.startDay===r.endDay?`${o}`:`${o} - ${i}`}})}function Z$(e,t){const n=[],r=e.intervals.length>0&&e.intervals[0].is24h();return e.intervals.length===0?n.push("Closed"):r?n.push("Open 24 hours"):e.intervals.forEach(o=>{const i=o.getStartTime("en-US",t),a=o.getEndTime("en-US",t);n.push(`${i} - ${a}`)}),n}function J$(e,t,n){const r=[];for(let o=1;o<=7;o++){const i=Cn.fromObject({weekday:o}),a=Gg(i);r.push({startDay:a,endDay:a,dayName:n&&mi(a)in n?n[mi(a)]||"":mi(a),intervals:e.filter(l=>l.start.weekday===o),isToday:t.weekday===o})}return r}const X$=e=>{const[t,n]=z.useState(!1);z.useEffect(()=>{n(!0)},[]);const r=new EC(e.hours,Intl.DateTimeFormat().resolvedOptions().timeZone),o=Cn.now(),i=r.getIntervalsForNDays(7,o);let a=J$(i,o,e.dayOfWeekNames);function l(m){return m?{today:Gg(o),monday:dn.Monday,tuesday:dn.Tuesday,wednesday:dn.Wednesday,thursday:dn.Thursday,friday:dn.Friday,saturday:dn.Saturday,sunday:dn.Sunday}[m]:dn.Sunday}let u=[dn.Sunday,dn.Monday,dn.Tuesday,dn.Wednesday,dn.Thursday,dn.Friday,dn.Saturday];const p=u.indexOf(l(e.startOfWeek));return u=B$(u,7-p),a.sort((m,_)=>u.indexOf(m.startDay)-u.indexOf(_.startDay)),e.collapseDays&&(a=q$(a,e.dayOfWeekNames)),an.jsx(an.Fragment,{children:t&&an.jsx("div",{className:Cu("HoursTable",e.className),children:a.map(m=>{const _=(e.intervalStringsBuilderFn||Z$)(m,e.timeOptions);return an.jsxs("div",{className:Cu("HoursTable-row",{"is-today":m.isToday}),children:[an.jsx("span",{className:"HoursTable-day",children:m.dayName}),an.jsx("span",{className:"HoursTable-intervals",children:_.map((v,C)=>an.jsx("span",{className:"HoursTable-interval",children:v},C))})]},m.dayName)})})})},Up=Math.log2(1.6745627884839434),Q$=4,eD=19,Vp="js-baidu-neg-lng-fix";let CC;const tD=new Promise(e=>CC=e),nD="https://api.map.baidu.com/geoconv/v1/";let su=[];const rD="gcj02ToBD09Callback_b872c21c";let oD=0,mb;async function wC(e){return await new Promise((t,n)=>{su.push({coordinates:e,resolve:t,reject:n}),su.length===1&&(mb=setTimeout(r,100)),su.length>40&&(clearTimeout(mb),r());function r(){const o=su;su=[];const i=[].concat(...o.map(u=>u.coordinates)),a=rD+"_"+oD++,l=document.createElement("script");window[a]=u=>{if(u.status){const _=new Error(`Unable to convert coordinates to BD-09: Received status code ${u.status}${u.message?": "+u.message:""}`);o.forEach(v=>v.reject(_))}const p=u.result.map(_=>new Jl(_.y,_.x));let m=0;o.forEach(_=>{_.resolve(p.slice(m,m+=_.coordinates.length))}),delete window[a],l.parentNode.removeChild(l)},tD.then(u=>{const p={ak:u,callback:a,coords:i.map(m=>`${m.longitude},${m.latitude}`).join(";"),from:3,to:5};l.src=nD+"?"+Object.entries(p).map(([m,_])=>m+"="+_).join("&"),document.head.appendChild(l)})}})}class iD extends Xl{constructor(t){super(t);const n=!!(window.MSInputMethodContext&&document.documentMode);this._wrapper=t.wrapper,this.map=new BMap.Map(this._wrapper,{enableMapClick:t.controlEnabled,maxZoom:n?14:18,...t.providerOptions}),t.controlEnabled?(this.map.enableScrollWheelZoom(),this.map.addControl(new BMap.NavigationControl({anchor:BMAP_ANCHOR_TOP_RIGHT,type:BMAP_NAVIGATION_CONTROL_ZOOM}))):(this.map.disableDragging(),this.map.disableDoubleClickZoom(),this.map.disablePinchToZoom()),this.map.addEventListener("movestart",()=>this._panStartHandler()),this.map.addEventListener("moveend",()=>this._panHandler()),this.map.addEventListener("zoomstart",()=>this._panStartHandler()),this.map.addEventListener("zoomend",()=>{this._wrapper.dataset.baiduZoom=this.map.getZoom(),this._panHandler()}),this._centerReady=Promise.resolve()}getCenter(){return new Jl(this.map.getCenter())}getZoom(){return this.map.getZoom()-Up}setCenter(t,n){this._centerReady=wC([t]).then(([r])=>{const o=new BMap.Point(r.longitude,r.latitude);this.map.panTo(o,{noAnimation:!n})})}setZoom(t,n){this._centerReady.then(()=>{this.map.setViewport({center:this.map.getCenter(),zoom:Math.floor(t+Up)},{enableAnimation:n})})}}class aD extends Of{constructor(t){super(t),this._wrapper=null,this._zIndex=0,this._wrapperClass="",this._originalWrapperClass="",this._element=this._pinEl,this._coordinateReady=Promise.resolve(),this._negativeLngFix=!1;const n=this;class r extends BMap.Marker{initialize(a){return n._wrapper=super.initialize(a),n._wrapper&&(n._wrapper.style.zIndex=n._zIndex,n._originalWrapperClass=n._wrapper.getAttribute("class"),n._wrapper.setAttribute("class",n._getClass()),n._wrapper.appendChild(n._element),n.addListeners()),n._wrapper}draw(){if(n._wrapper){const a=n._wrapper.style.zIndex;super.draw(),n._wrapper.style.height="",n._wrapper.style.width="",n._wrapper.style.pointerEvents="none",n._wrapper.style.zIndex=a}else super.draw()}}this.pin=new r(new BMap.Point(0,0));const o=new BMap.Icon("data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",{height:0,width:0});this.pin.setIcon(o),this.pin.setShadow(o)}addListeners(){super.addListeners(),this._wrapper.addEventListener("touchend",()=>this._clickHandler())}setCoordinate(t){this._coordinateReady=wC([t]).then(([n])=>{this._negativeLngFix=n.longitude<0,this.pin.setPosition(new BMap.Point(n.longitude+(this._negativeLngFix?180:0),n.latitude)),this._wrapper&&this._wrapper.classList[this._negativeLngFix?"add":"remove"](Vp)})}setMap(t,n){this._coordinateReady.then(()=>{n&&n.getProviderMap().map.removeOverlay(this.pin),t&&t.getProviderMap().map.addOverlay(this.pin)})}setProperties(t){super.setProperties(t),this._wrapperClass=t.getClass(),this._element=t.getElement()||this._pinEl,this._zIndex=t.getZIndex(),this._wrapper&&this._wrapper.setAttribute("class",this._getClass())}_getClass(){return`${this._originalWrapperClass} ${this._negativeLngFix?Vp:""} ${this._wrapperClass}`}}const sD="https://api.map.baidu.com/getscript";function lD(e,t,n,{params:r={},version:o="3.0"}={}){window.BMAP_PROTOCOL="https",window.BMap_loadScriptTime=new Date().getTime();const i=n,a={ak:i,v:o,...r};CC(i);const l=document.createElement("script");l.src=sD+"?"+Object.entries(a).map(([m,_])=>m+"="+_).join("&"),l.onload=()=>e(),document.head.appendChild(l);let u="";for(let m=Q$;m<=eD;m++){const _=2**(m-Up+7);u+=`[data-baidu-zoom="${m}"] .${Vp}{transform:translateX(-${_}px);}`}const p=document.createElement("style");p.appendChild(document.createTextNode(u)),document.head.appendChild(p)}new Ts().withLoadFunction(lD).withMapClass(iD).withPinClass(aD).withProviderName("Baidu").build();let NC;function cD(){class e extends Microsoft.Maps.CustomOverlay{constructor(){super({beneathLabels:!1}),this._container=document.createElement("div"),this._map=null,this._pins=new Set,this._viewChangeEventHandler=null,this._container.style.position="absolute",this._container.style.left="0",this._container.style.top="0"}addPin(n){this._pins.add(n),n._wrapper.style.position="absolute",this._container.appendChild(n._wrapper),this._map&&this.updatePinPosition(n)}onAdd(){this._map=this.getMap(),this.setHtmlElement(this._container)}onLoad(){this._viewChangeEventHandler=Microsoft.Maps.Events.addHandler(this._map,"viewchange",()=>this.updatePinPositions()),this.updatePinPositions()}onRemove(){Microsoft.Maps.Events.removeHandler(this._viewChangeEventHandler),this._map=null}removePin(n){this._pins.delete(n),this._container.removeChild(n._wrapper)}updatePinPosition(n){if(!this._map)return;const r=this._map.tryLocationToPixel(n._location,Microsoft.Maps.PixelReference.control);n._wrapper.style.left=r.x+"px",n._wrapper.style.top=r.y+"px"}updatePinPositions(){this._pins.forEach(n=>this.updatePinPosition(n))}}NC=e}class uD extends Xl{constructor(t){super(t),this.wrapper=t.wrapper,this.map=new Microsoft.Maps.Map(this.wrapper,{disablePanning:!t.controlEnabled,disableZooming:!t.controlEnabled,showLocateMeButton:!1,showMapTypeSelector:!1,showScalebar:!1,showTrafficButton:!1,...t.providerOptions}),this.pinOverlay=new NC(this.map),this.map.layers.insert(this.pinOverlay),Microsoft.Maps.Events.addHandler(this.map,"viewchangestart",()=>this._panStartHandler()),Microsoft.Maps.Events.addHandler(this.map,"viewchangeend",()=>this._panHandler())}getCenter(){return new Jl(this.map.getCenter())}getZoom(){return this.map.getZoom()}setCenter(t,n){const r=new Microsoft.Maps.Location(t.latitude,t.longitude);this.map.setView({center:r}),this.pinOverlay.updatePinPositions()}setZoom(t,n){this.map.setView({zoom:Math.floor(t)}),this.pinOverlay.updatePinPositions()}}class dD extends Of{static getId(){return this._pinId=(this._pinId||0)+1,this._pinId}constructor(t){super(t),this._map=null,this._location=new Microsoft.Maps.Location(0,0)}setCoordinate(t){this._location=new Microsoft.Maps.Location(t.latitude,t.longitude),this._map&&this._map.getProviderMap().pinOverlay.updatePinPosition(this)}setMap(t,n){n&&n.getProviderMap().pinOverlay.removePin(this),t&&t.getProviderMap().pinOverlay.addPin(this),this._map=t}}const vb="BingMapsCallback_593d7d33",fD="https://www.bing.com/api/maps/mapcontrol";function hD(e,t,n,{params:r={}}={}){window[vb]=()=>{cD(),e()};const o={callback:vb,key:n,...r};qx(fD+"?"+Object.entries(o).map(([i,a])=>i+"="+a).join("&"))}new Ts().withLoadFunction(hD).withMapClass(uD).withPinClass(dD).withProviderName("Bing").build();class pD extends Xl{constructor(t){if(super(t),this.map=new mapboxgl.Map({container:t.wrapper,interactive:t.controlEnabled,style:"mapbox://styles/mapbox/streets-v9",...t.providerOptions}),t.controlEnabled){const n=new mapboxgl.NavigationControl({showCompass:!1});this.map.addControl(n)}this.map.on("movestart",()=>this._panStartHandler()),this.map.on("moveend",()=>this._panHandler())}getCenter(){return new Jl(this.map.getCenter())}getZoom(){return this.map.getZoom()+1}setCenter(t,n){const r=new mapboxgl.LngLat(t.longitude,t.latitude);this.map[n?"panTo":"setCenter"](r)}setZoom(t,n){this.map[n?"zoomTo":"setZoom"](t-1)}setZoomCenter(t,n,r){const o=new mapboxgl.LngLat(n.longitude,n.latitude);this.map[r?"easeTo":"jumpTo"]({center:o,zoom:t-1})}}class gD extends Of{constructor(t){super(t),this._wrapper.style.position="relative",this.pin=new mapboxgl.Marker({anchor:"top-left",element:this._wrapper})}setCoordinate(t){this.pin.setLngLat(new mapboxgl.LngLat(t.longitude,t.latitude))}setMap(t,n){t?this.pin.addTo(t.getProviderMap().map):this.pin.remove()}}function mD(e,t,n,{version:r="v1.13.0"}={}){const o=`https://api.mapbox.com/mapbox-gl-js/${r}/mapbox-gl`,i=document.createElement("link");i.rel="stylesheet",i.href=o+".css";const a=document.createElement("script");a.src=o+".js",a.onload=()=>{mapboxgl.accessToken=n,e()},document.head.appendChild(i),document.head.appendChild(a)}new Ts().withLoadFunction(mD).withMapClass(pD).withPinClass(gD).withProviderName("Mapbox").build();let TC=class extends Xl{constructor(e){super(e),this._initMap(e),e.controlEnabled&&this.map.zoomControl.setPosition("topright"),this.map.on("movestart",()=>this._panStartHandler()),this.map.on("moveend",()=>this._panHandler())}getCenter(){return new Jl(this.map.getCenter())}getZoom(){return this.map.getZoom()}setCenter(e,t){const n=new L.latLng(e.latitude,e.longitude);this.map.panTo(n,{animate:t})}setZoom(e,t){this.map.setZoom(e,{animate:t})}setZoomCenter(e,t,n){const r=new L.latLng(t.latitude,t.longitude);this.map.setView(r,e,{animate:n})}_initMap(e){this.map=new L.map(e.wrapper,{boxZoom:e.controlEnabled,doubleClickZoom:e.controlEnabled,dragging:e.controlEnabled,zoom:0,zoomControl:e.controlEnabled,zoomSnap:0,...e.providerOptions});const t=e.providerOptions,n=t.tileLayerSrc||"https://api.mapbox.com/styles/v1/{id}/tiles/{z}/{x}/{y}?access_token={accessToken}",r=t.tileLayerOptions||{attribution:'Map data © <a href="https://www.openstreetmap.org/">OpenStreetMap</a> contributors, <a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, Imagery © <a href="https://www.mapbox.com/">Mapbox</a>',id:"mapbox/streets-v11"};r.accessToken=this.constructor.apiKey,L.tileLayer(n,r).addTo(this.map)}},vD=class extends Ag{constructor(e){super(e),this.pin=new L.marker,this.pin.on("click",()=>this._clickHandler()),this.pin.on("mouseover",()=>this._hoverHandler(!0)),this.pin.on("mouseout",()=>this._hoverHandler(!1))}setCoordinate(e){const t=new L.latLng(e.latitude,e.longitude);this.pin.setLatLng(t)}setMap(e,t){e?this.pin.addTo(e.getProviderMap().map):this.pin.remove()}setProperties(e){const t=e.getWidth(),n=e.getHeight(),r=e.getAnchorX(),o=e.getAnchorY();this.pin.setIcon(new L.icon({iconUrl:this._icons[e.getIcon()],iconSize:[t,n],iconAnchor:[r*t,o*n],className:e.getClass()})),this.pin.setZIndexOffset(e.getZIndex())}};function yD(e,t,n,{version:r="1.7.1"}={}){const o=`https://unpkg.com/leaflet@${r}/dist/leaflet`;TC.apiKey=n;const i=document.createElement("link");i.rel="stylesheet",i.href=o+".css";const a=document.createElement("script");a.src=o+".js",a.onload=()=>e(),document.head.appendChild(i),document.head.appendChild(a)}const SC=new Ts().withLoadFunction(yD).withMapClass(TC).withPinClass(vD).withProviderName("Leaflet").build(),bD=SC.getMapClass(),_D=SC.getPinClass();class xD extends bD{_initMap(t){this.map=L.mapquest.map(t.wrapper,{boxZoom:t.controlEnabled,center:new L.latLng(0,0),doubleClickZoom:t.controlEnabled,dragging:t.controlEnabled,layers:L.mapquest.tileLayer("map"),zoom:0,zoomControl:t.controlEnabled,zoomSnap:0,...t.providerOptions})}}class ED extends _D{}function CD(e,t,n,{version:r="v1.3.2"}={}){const o=`https://api.mqcdn.com/sdk/mapquest-js/${r}/mapquest-maps`,i=document.createElement("link");i.rel="stylesheet",i.href=o+".css";const a=document.createElement("script");a.src=o+".js",a.onload=()=>{L.mapquest.key=n,e()},document.head.appendChild(i),document.head.appendChild(a)}new Ts().withLoadFunction(CD).withMapClass(xD).withPinClass(ED).withProviderName("MapQuest").build();const Ug=({label:e,url:t,variant:n,size:r,className:o})=>ne.jsx(Og,{asChild:!0,className:o,variant:n,size:r,children:ne.jsx(Yx,{href:t??"",children:e})});Ug.displayName="CTA";const OC=Dr("components",{variants:{weight:{default:"",thin:"font-thin",extralight:"font-extralight",light:"font-light",normal:"font-normal",medium:"font-medium",semibold:"font-semibold",bold:"font-bold",extrabold:"font-extrabold",black:"font-black"},color:{default:"",primary:"text-palette-primary",secondary:"text-palette-secondary",accent:"text-palette-accent",text:"text-palette-text",background:"text-palette-background"},transform:{none:"",uppercase:"uppercase",lowercase:"lowercase",capitalize:"capitalize"},level:{1:"font-heading1-fontWeight text-heading1-fontSize text-heading1-color",2:"font-heading2-fontWeight text-heading2-fontSize text-heading2-color",3:"font-heading3-fontWeight text-heading3-fontSize text-heading3-color",4:"font-heading4-fontWeight text-heading4-fontSize text-heading4-color",5:"font-heading5-fontWeight text-heading5-fontSize text-heading5-color",6:"font-heading6-fontWeight text-heading6-fontSize text-heading6-color"}},defaultVariants:{color:"primary",weight:"default",transform:"none"}}),Vg=de.forwardRef(({className:e,level:t=1,color:n,weight:r,transform:o,...i},a)=>{const l=`h${t}`;return ne.jsx(l,{id:"tag",className:OC({color:n,className:e,weight:r,transform:o,level:t}),ref:a,...i,children:i.children})});Vg.displayName="Heading";const AC=Dr("mx-auto",{variants:{padding:{default:"px-4 py-16 md:px-8",none:"p-0",small:"px-4 py-8 md:px-8",large:"px-[200px] py-24 md:px-8"},maxWidth:{default:"max-w-6xl",full:"max-w-full",xl:"max-w-4xl"}},defaultVariants:{padding:"default",maxWidth:"default"}}),Fu=de.forwardRef(({className:e,padding:t,maxWidth:n,...r},o)=>ne.jsx("div",{className:"components bg-main",children:ne.jsx("div",{className:$u(e,AC({padding:t,maxWidth:n})),ref:o,...r,children:r.children})}));Fu.displayName="Section";const Yg=de.createContext(void 0),wD=({value:e,children:t})=>ne.jsx(Yg.Provider,{value:e,children:t}),Uo=()=>{const e=de.useContext(Yg);if(!e)throw new Error("useDocument must be used within a DocumentProvider");return e},xi=(e,t)=>{if(!(!t||typeof t!="object"||!("field"in t)||!("constantValue"in t))){if(t.constantValueEnabled)return t.constantValue;if(t.field!==""){try{const n=t.field.split(".");let r=!1,o=e;for(let i=0;i<n.length;i++)if((o==null?void 0:o[n[i]])!==void 0)o=o[n[i]];else{r=!0;break}if(!r)return o}catch(n){console.error("Error in resolveYextEntityField:",n)}console.warn(`The field ${t.field} was not found in the document.`)}}};function On(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function ND(e,t){const n=de.createContext(t);function r(i){const{children:a,...l}=i,u=de.useMemo(()=>l,Object.values(l));return ne.jsx(n.Provider,{value:u,children:a})}function o(i){const a=de.useContext(n);if(a)return a;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return r.displayName=e+"Provider",[r,o]}function za(e,t=[]){let n=[];function r(i,a){const l=de.createContext(a),u=n.length;n=[...n,a];function p(_){const{scope:v,children:C,...b}=_,y=(v==null?void 0:v[e][u])||l,N=de.useMemo(()=>b,Object.values(b));return ne.jsx(y.Provider,{value:N,children:C})}function m(_,v){const C=(v==null?void 0:v[e][u])||l,b=de.useContext(C);if(b)return b;if(a!==void 0)return a;throw new Error(`\`${_}\` must be used within \`${i}\``)}return p.displayName=i+"Provider",[p,m]}const o=()=>{const i=n.map(a=>de.createContext(a));return function(l){const u=(l==null?void 0:l[e])||i;return de.useMemo(()=>({[`__scope${e}`]:{...l,[e]:u}}),[l,u])}};return o.scopeName=e,[r,TD(o,...t)]}function TD(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const a=r.reduce((l,{useScope:u,scopeName:p})=>{const _=u(i)[`__scope${p}`];return{...l,..._}},{});return de.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}var SD=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Mn=SD.reduce((e,t)=>{const n=de.forwardRef((r,o)=>{const{asChild:i,...a}=r,l=i?Pa:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),ne.jsx(l,{...a,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function OD(e,t){e&&Ng.flushSync(()=>e.dispatchEvent(t))}function Zi(e){const t=de.useRef(e);return de.useEffect(()=>{t.current=e}),de.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function AD(e,t=globalThis==null?void 0:globalThis.document){const n=Zi(e);de.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var RD="DismissableLayer",Yp="dismissableLayer.update",$D="dismissableLayer.pointerDownOutside",DD="dismissableLayer.focusOutside",yb,RC=de.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),qg=de.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:a,onDismiss:l,...u}=e,p=de.useContext(RC),[m,_]=de.useState(null),v=(m==null?void 0:m.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,C]=de.useState({}),b=er(t,ee=>_(ee)),y=Array.from(p.layers),[N]=[...p.layersWithOutsidePointerEventsDisabled].slice(-1),R=y.indexOf(N),O=m?y.indexOf(m):-1,k=p.layersWithOutsidePointerEventsDisabled.size>0,I=O>=R,M=PD(ee=>{const re=ee.target,Z=[...p.branches].some(U=>U.contains(re));!I||Z||(o==null||o(ee),a==null||a(ee),ee.defaultPrevented||l==null||l())},v),Y=ID(ee=>{const re=ee.target;[...p.branches].some(U=>U.contains(re))||(i==null||i(ee),a==null||a(ee),ee.defaultPrevented||l==null||l())},v);return AD(ee=>{O===p.layers.size-1&&(r==null||r(ee),!ee.defaultPrevented&&l&&(ee.preventDefault(),l()))},v),de.useEffect(()=>{if(m)return n&&(p.layersWithOutsidePointerEventsDisabled.size===0&&(yb=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),p.layersWithOutsidePointerEventsDisabled.add(m)),p.layers.add(m),bb(),()=>{n&&p.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=yb)}},[m,v,n,p]),de.useEffect(()=>()=>{m&&(p.layers.delete(m),p.layersWithOutsidePointerEventsDisabled.delete(m),bb())},[m,p]),de.useEffect(()=>{const ee=()=>C({});return document.addEventListener(Yp,ee),()=>document.removeEventListener(Yp,ee)},[]),ne.jsx(Mn.div,{...u,ref:b,style:{pointerEvents:k?I?"auto":"none":void 0,...e.style},onFocusCapture:On(e.onFocusCapture,Y.onFocusCapture),onBlurCapture:On(e.onBlurCapture,Y.onBlurCapture),onPointerDownCapture:On(e.onPointerDownCapture,M.onPointerDownCapture)})});qg.displayName=RD;var MD="DismissableLayerBranch",kD=de.forwardRef((e,t)=>{const n=de.useContext(RC),r=de.useRef(null),o=er(t,r);return de.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),ne.jsx(Mn.div,{...e,ref:o})});kD.displayName=MD;function PD(e,t=globalThis==null?void 0:globalThis.document){const n=Zi(e),r=de.useRef(!1),o=de.useRef(()=>{});return de.useEffect(()=>{const i=l=>{if(l.target&&!r.current){let u=function(){$C($D,n,p,{discrete:!0})};const p={originalEvent:l};l.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=u,t.addEventListener("click",o.current,{once:!0})):u()}else t.removeEventListener("click",o.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function ID(e,t=globalThis==null?void 0:globalThis.document){const n=Zi(e),r=de.useRef(!1);return de.useEffect(()=>{const o=i=>{i.target&&!r.current&&$C(DD,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function bb(){const e=new CustomEvent(Yp);document.dispatchEvent(e)}function $C(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?OD(o,i):o.dispatchEvent(i)}var Ji=globalThis!=null&&globalThis.document?de.useLayoutEffect:()=>{},LD=de.useId||(()=>{}),FD=0;function xu(e){const[t,n]=de.useState(LD());return Ji(()=>{n(r=>r??String(FD++))},[e]),t?`radix-${t}`:""}const jD=["top","right","bottom","left"],Ia=Math.min,ro=Math.max,df=Math.round,Ld=Math.floor,yi=e=>({x:e,y:e}),BD={left:"right",right:"left",bottom:"top",top:"bottom"},HD={start:"end",end:"start"};function qp(e,t,n){return ro(e,Ia(t,n))}function Xi(e,t){return typeof e=="function"?e(t):e}function Qi(e){return e.split("-")[0]}function rc(e){return e.split("-")[1]}function Zg(e){return e==="x"?"y":"x"}function Jg(e){return e==="y"?"height":"width"}function La(e){return["top","bottom"].includes(Qi(e))?"y":"x"}function Xg(e){return Zg(La(e))}function WD(e,t,n){n===void 0&&(n=!1);const r=rc(e),o=Xg(e),i=Jg(o);let a=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=ff(a)),[a,ff(a)]}function zD(e){const t=ff(e);return[Zp(e),t,Zp(t)]}function Zp(e){return e.replace(/start|end/g,t=>HD[t])}function KD(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:a;default:return[]}}function GD(e,t,n,r){const o=rc(e);let i=KD(Qi(e),n==="start",r);return o&&(i=i.map(a=>a+"-"+o),t&&(i=i.concat(i.map(Zp)))),i}function ff(e){return e.replace(/left|right|bottom|top/g,t=>BD[t])}function UD(e){return{top:0,right:0,bottom:0,left:0,...e}}function DC(e){return typeof e!="number"?UD(e):{top:e,right:e,bottom:e,left:e}}function hf(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function _b(e,t,n){let{reference:r,floating:o}=e;const i=La(t),a=Xg(t),l=Jg(a),u=Qi(t),p=i==="y",m=r.x+r.width/2-o.width/2,_=r.y+r.height/2-o.height/2,v=r[l]/2-o[l]/2;let C;switch(u){case"top":C={x:m,y:r.y-o.height};break;case"bottom":C={x:m,y:r.y+r.height};break;case"right":C={x:r.x+r.width,y:_};break;case"left":C={x:r.x-o.width,y:_};break;default:C={x:r.x,y:r.y}}switch(rc(t)){case"start":C[a]-=v*(n&&p?-1:1);break;case"end":C[a]+=v*(n&&p?-1:1);break}return C}const VD=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,l=i.filter(Boolean),u=await(a.isRTL==null?void 0:a.isRTL(t));let p=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:m,y:_}=_b(p,r,u),v=r,C={},b=0;for(let y=0;y<l.length;y++){const{name:N,fn:R}=l[y],{x:O,y:k,data:I,reset:M}=await R({x:m,y:_,initialPlacement:r,placement:v,strategy:o,middlewareData:C,rects:p,platform:a,elements:{reference:e,floating:t}});m=O??m,_=k??_,C={...C,[N]:{...C[N],...I}},M&&b<=50&&(b++,typeof M=="object"&&(M.placement&&(v=M.placement),M.rects&&(p=M.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):M.rects),{x:m,y:_}=_b(p,v,u)),y=-1)}return{x:m,y:_,placement:v,strategy:o,middlewareData:C}};async function Tu(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:a,elements:l,strategy:u}=e,{boundary:p="clippingAncestors",rootBoundary:m="viewport",elementContext:_="floating",altBoundary:v=!1,padding:C=0}=Xi(t,e),b=DC(C),N=l[v?_==="floating"?"reference":"floating":_],R=hf(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(N)))==null||n?N:N.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(l.floating)),boundary:p,rootBoundary:m,strategy:u})),O=_==="floating"?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,k=await(i.getOffsetParent==null?void 0:i.getOffsetParent(l.floating)),I=await(i.isElement==null?void 0:i.isElement(k))?await(i.getScale==null?void 0:i.getScale(k))||{x:1,y:1}:{x:1,y:1},M=hf(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:O,offsetParent:k,strategy:u}):O);return{top:(R.top-M.top+b.top)/I.y,bottom:(M.bottom-R.bottom+b.bottom)/I.y,left:(R.left-M.left+b.left)/I.x,right:(M.right-R.right+b.right)/I.x}}const YD=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:a,elements:l,middlewareData:u}=t,{element:p,padding:m=0}=Xi(e,t)||{};if(p==null)return{};const _=DC(m),v={x:n,y:r},C=Xg(o),b=Jg(C),y=await a.getDimensions(p),N=C==="y",R=N?"top":"left",O=N?"bottom":"right",k=N?"clientHeight":"clientWidth",I=i.reference[b]+i.reference[C]-v[C]-i.floating[b],M=v[C]-i.reference[C],Y=await(a.getOffsetParent==null?void 0:a.getOffsetParent(p));let ee=Y?Y[k]:0;(!ee||!await(a.isElement==null?void 0:a.isElement(Y)))&&(ee=l.floating[k]||i.floating[b]);const re=I/2-M/2,Z=ee/2-y[b]/2-1,U=Ia(_[R],Z),J=Ia(_[O],Z),fe=U,ge=ee-y[b]-J,te=ee/2-y[b]/2+re,he=qp(fe,te,ge),V=!u.arrow&&rc(o)!=null&&te!==he&&i.reference[b]/2-(te<fe?U:J)-y[b]/2<0,B=V?te<fe?te-fe:te-ge:0;return{[C]:v[C]+B,data:{[C]:he,centerOffset:te-he-B,...V&&{alignmentOffset:B}},reset:V}}}),qD=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:a,initialPlacement:l,platform:u,elements:p}=t,{mainAxis:m=!0,crossAxis:_=!0,fallbackPlacements:v,fallbackStrategy:C="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:y=!0,...N}=Xi(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const R=Qi(o),O=La(l),k=Qi(l)===l,I=await(u.isRTL==null?void 0:u.isRTL(p.floating)),M=v||(k||!y?[ff(l)]:zD(l)),Y=b!=="none";!v&&Y&&M.push(...GD(l,y,b,I));const ee=[l,...M],re=await Tu(t,N),Z=[];let U=((r=i.flip)==null?void 0:r.overflows)||[];if(m&&Z.push(re[R]),_){const te=WD(o,a,I);Z.push(re[te[0]],re[te[1]])}if(U=[...U,{placement:o,overflows:Z}],!Z.every(te=>te<=0)){var J,fe;const te=(((J=i.flip)==null?void 0:J.index)||0)+1,he=ee[te];if(he)return{data:{index:te,overflows:U},reset:{placement:he}};let V=(fe=U.filter(B=>B.overflows[0]<=0).sort((B,q)=>B.overflows[1]-q.overflows[1])[0])==null?void 0:fe.placement;if(!V)switch(C){case"bestFit":{var ge;const B=(ge=U.filter(q=>{if(Y){const ie=La(q.placement);return ie===O||ie==="y"}return!0}).map(q=>[q.placement,q.overflows.filter(ie=>ie>0).reduce((ie,H)=>ie+H,0)]).sort((q,ie)=>q[1]-ie[1])[0])==null?void 0:ge[0];B&&(V=B);break}case"initialPlacement":V=l;break}if(o!==V)return{reset:{placement:V}}}return{}}}};function xb(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Eb(e){return jD.some(t=>e[t]>=0)}const ZD=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=Xi(e,t);switch(r){case"referenceHidden":{const i=await Tu(t,{...o,elementContext:"reference"}),a=xb(i,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:Eb(a)}}}case"escaped":{const i=await Tu(t,{...o,altBoundary:!0}),a=xb(i,n.floating);return{data:{escapedOffsets:a,escaped:Eb(a)}}}default:return{}}}}};async function JD(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),a=Qi(n),l=rc(n),u=La(n)==="y",p=["left","top"].includes(a)?-1:1,m=i&&u?-1:1,_=Xi(t,e);let{mainAxis:v,crossAxis:C,alignmentAxis:b}=typeof _=="number"?{mainAxis:_,crossAxis:0,alignmentAxis:null}:{mainAxis:_.mainAxis||0,crossAxis:_.crossAxis||0,alignmentAxis:_.alignmentAxis};return l&&typeof b=="number"&&(C=l==="end"?b*-1:b),u?{x:C*m,y:v*p}:{x:v*p,y:C*m}}const XD=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:a,middlewareData:l}=t,u=await JD(t,e);return a===((n=l.offset)==null?void 0:n.placement)&&(r=l.arrow)!=null&&r.alignmentOffset?{}:{x:o+u.x,y:i+u.y,data:{...u,placement:a}}}}},QD=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:l={fn:N=>{let{x:R,y:O}=N;return{x:R,y:O}}},...u}=Xi(e,t),p={x:n,y:r},m=await Tu(t,u),_=La(Qi(o)),v=Zg(_);let C=p[v],b=p[_];if(i){const N=v==="y"?"top":"left",R=v==="y"?"bottom":"right",O=C+m[N],k=C-m[R];C=qp(O,C,k)}if(a){const N=_==="y"?"top":"left",R=_==="y"?"bottom":"right",O=b+m[N],k=b-m[R];b=qp(O,b,k)}const y=l.fn({...t,[v]:C,[_]:b});return{...y,data:{x:y.x-n,y:y.y-r,enabled:{[v]:i,[_]:a}}}}}},eM=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:a}=t,{offset:l=0,mainAxis:u=!0,crossAxis:p=!0}=Xi(e,t),m={x:n,y:r},_=La(o),v=Zg(_);let C=m[v],b=m[_];const y=Xi(l,t),N=typeof y=="number"?{mainAxis:y,crossAxis:0}:{mainAxis:0,crossAxis:0,...y};if(u){const k=v==="y"?"height":"width",I=i.reference[v]-i.floating[k]+N.mainAxis,M=i.reference[v]+i.reference[k]-N.mainAxis;C<I?C=I:C>M&&(C=M)}if(p){var R,O;const k=v==="y"?"width":"height",I=["top","left"].includes(Qi(o)),M=i.reference[_]-i.floating[k]+(I&&((R=a.offset)==null?void 0:R[_])||0)+(I?0:N.crossAxis),Y=i.reference[_]+i.reference[k]+(I?0:((O=a.offset)==null?void 0:O[_])||0)-(I?N.crossAxis:0);b<M?b=M:b>Y&&(b=Y)}return{[v]:C,[_]:b}}}},tM=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:a,elements:l}=t,{apply:u=()=>{},...p}=Xi(e,t),m=await Tu(t,p),_=Qi(o),v=rc(o),C=La(o)==="y",{width:b,height:y}=i.floating;let N,R;_==="top"||_==="bottom"?(N=_,R=v===(await(a.isRTL==null?void 0:a.isRTL(l.floating))?"start":"end")?"left":"right"):(R=_,N=v==="end"?"top":"bottom");const O=y-m.top-m.bottom,k=b-m.left-m.right,I=Ia(y-m[N],O),M=Ia(b-m[R],k),Y=!t.middlewareData.shift;let ee=I,re=M;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(re=k),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(ee=O),Y&&!v){const U=ro(m.left,0),J=ro(m.right,0),fe=ro(m.top,0),ge=ro(m.bottom,0);C?re=b-2*(U!==0||J!==0?U+J:ro(m.left,m.right)):ee=y-2*(fe!==0||ge!==0?fe+ge:ro(m.top,m.bottom))}await u({...t,availableWidth:re,availableHeight:ee});const Z=await a.getDimensions(l.floating);return b!==Z.width||y!==Z.height?{reset:{rects:!0}}:{}}}};function kf(){return typeof window<"u"}function oc(e){return MC(e)?(e.nodeName||"").toLowerCase():"#document"}function ao(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ei(e){var t;return(t=(MC(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function MC(e){return kf()?e instanceof Node||e instanceof ao(e).Node:!1}function Ko(e){return kf()?e instanceof Element||e instanceof ao(e).Element:!1}function _i(e){return kf()?e instanceof HTMLElement||e instanceof ao(e).HTMLElement:!1}function Cb(e){return!kf()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ao(e).ShadowRoot}function ju(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Go(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function nM(e){return["table","td","th"].includes(oc(e))}function Pf(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Qg(e){const t=em(),n=Ko(e)?Go(e):e;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function rM(e){let t=Fa(e);for(;_i(t)&&!Yl(t);){if(Qg(t))return t;if(Pf(t))return null;t=Fa(t)}return null}function em(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Yl(e){return["html","body","#document"].includes(oc(e))}function Go(e){return ao(e).getComputedStyle(e)}function If(e){return Ko(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Fa(e){if(oc(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Cb(e)&&e.host||Ei(e);return Cb(t)?t.host:t}function kC(e){const t=Fa(e);return Yl(t)?e.ownerDocument?e.ownerDocument.body:e.body:_i(t)&&ju(t)?t:kC(t)}function Su(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=kC(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),a=ao(o);if(i){const l=Jp(a);return t.concat(a,a.visualViewport||[],ju(o)?o:[],l&&n?Su(l):[])}return t.concat(o,Su(o,[],n))}function Jp(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function PC(e){const t=Go(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=_i(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,l=df(n)!==i||df(r)!==a;return l&&(n=i,r=a),{width:n,height:r,$:l}}function tm(e){return Ko(e)?e:e.contextElement}function zl(e){const t=tm(e);if(!_i(t))return yi(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=PC(t);let a=(i?df(n.width):n.width)/r,l=(i?df(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!l||!Number.isFinite(l))&&(l=1),{x:a,y:l}}const oM=yi(0);function IC(e){const t=ao(e);return!em()||!t.visualViewport?oM:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function iM(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==ao(e)?!1:t}function Cs(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=tm(e);let a=yi(1);t&&(r?Ko(r)&&(a=zl(r)):a=zl(e));const l=iM(i,n,r)?IC(i):yi(0);let u=(o.left+l.x)/a.x,p=(o.top+l.y)/a.y,m=o.width/a.x,_=o.height/a.y;if(i){const v=ao(i),C=r&&Ko(r)?ao(r):r;let b=v,y=Jp(b);for(;y&&r&&C!==b;){const N=zl(y),R=y.getBoundingClientRect(),O=Go(y),k=R.left+(y.clientLeft+parseFloat(O.paddingLeft))*N.x,I=R.top+(y.clientTop+parseFloat(O.paddingTop))*N.y;u*=N.x,p*=N.y,m*=N.x,_*=N.y,u+=k,p+=I,b=ao(y),y=Jp(b)}}return hf({width:m,height:_,x:u,y:p})}function nm(e,t){const n=If(e).scrollLeft;return t?t.left+n:Cs(Ei(e)).left+n}function LC(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-(n?0:nm(e,r)),i=r.top+t.scrollTop;return{x:o,y:i}}function aM(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",a=Ei(r),l=t?Pf(t.floating):!1;if(r===a||l&&i)return n;let u={scrollLeft:0,scrollTop:0},p=yi(1);const m=yi(0),_=_i(r);if((_||!_&&!i)&&((oc(r)!=="body"||ju(a))&&(u=If(r)),_i(r))){const C=Cs(r);p=zl(r),m.x=C.x+r.clientLeft,m.y=C.y+r.clientTop}const v=a&&!_&&!i?LC(a,u,!0):yi(0);return{width:n.width*p.x,height:n.height*p.y,x:n.x*p.x-u.scrollLeft*p.x+m.x+v.x,y:n.y*p.y-u.scrollTop*p.y+m.y+v.y}}function sM(e){return Array.from(e.getClientRects())}function lM(e){const t=Ei(e),n=If(e),r=e.ownerDocument.body,o=ro(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=ro(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+nm(e);const l=-n.scrollTop;return Go(r).direction==="rtl"&&(a+=ro(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:l}}function cM(e,t){const n=ao(e),r=Ei(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,l=0,u=0;if(o){i=o.width,a=o.height;const p=em();(!p||p&&t==="fixed")&&(l=o.offsetLeft,u=o.offsetTop)}return{width:i,height:a,x:l,y:u}}function uM(e,t){const n=Cs(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=_i(e)?zl(e):yi(1),a=e.clientWidth*i.x,l=e.clientHeight*i.y,u=o*i.x,p=r*i.y;return{width:a,height:l,x:u,y:p}}function wb(e,t,n){let r;if(t==="viewport")r=cM(e,n);else if(t==="document")r=lM(Ei(e));else if(Ko(t))r=uM(t,n);else{const o=IC(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return hf(r)}function FC(e,t){const n=Fa(e);return n===t||!Ko(n)||Yl(n)?!1:Go(n).position==="fixed"||FC(n,t)}function dM(e,t){const n=t.get(e);if(n)return n;let r=Su(e,[],!1).filter(l=>Ko(l)&&oc(l)!=="body"),o=null;const i=Go(e).position==="fixed";let a=i?Fa(e):e;for(;Ko(a)&&!Yl(a);){const l=Go(a),u=Qg(a);!u&&l.position==="fixed"&&(o=null),(i?!u&&!o:!u&&l.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||ju(a)&&!u&&FC(e,a))?r=r.filter(m=>m!==a):o=l,a=Fa(a)}return t.set(e,r),r}function fM(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[...n==="clippingAncestors"?Pf(t)?[]:dM(t,this._c):[].concat(n),r],l=a[0],u=a.reduce((p,m)=>{const _=wb(t,m,o);return p.top=ro(_.top,p.top),p.right=Ia(_.right,p.right),p.bottom=Ia(_.bottom,p.bottom),p.left=ro(_.left,p.left),p},wb(t,l,o));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function hM(e){const{width:t,height:n}=PC(e);return{width:t,height:n}}function pM(e,t,n){const r=_i(t),o=Ei(t),i=n==="fixed",a=Cs(e,!0,i,t);let l={scrollLeft:0,scrollTop:0};const u=yi(0);if(r||!r&&!i)if((oc(t)!=="body"||ju(o))&&(l=If(t)),r){const v=Cs(t,!0,i,t);u.x=v.x+t.clientLeft,u.y=v.y+t.clientTop}else o&&(u.x=nm(o));const p=o&&!r&&!i?LC(o,l):yi(0),m=a.left+l.scrollLeft-u.x-p.x,_=a.top+l.scrollTop-u.y-p.y;return{x:m,y:_,width:a.width,height:a.height}}function op(e){return Go(e).position==="static"}function Nb(e,t){if(!_i(e)||Go(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Ei(e)===n&&(n=n.ownerDocument.body),n}function jC(e,t){const n=ao(e);if(Pf(e))return n;if(!_i(e)){let o=Fa(e);for(;o&&!Yl(o);){if(Ko(o)&&!op(o))return o;o=Fa(o)}return n}let r=Nb(e,t);for(;r&&nM(r)&&op(r);)r=Nb(r,t);return r&&Yl(r)&&op(r)&&!Qg(r)?n:r||rM(e)||n}const gM=async function(e){const t=this.getOffsetParent||jC,n=this.getDimensions,r=await n(e.floating);return{reference:pM(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function mM(e){return Go(e).direction==="rtl"}const vM={convertOffsetParentRelativeRectToViewportRelativeRect:aM,getDocumentElement:Ei,getClippingRect:fM,getOffsetParent:jC,getElementRects:gM,getClientRects:sM,getDimensions:hM,getScale:zl,isElement:Ko,isRTL:mM};function yM(e,t){let n=null,r;const o=Ei(e);function i(){var l;clearTimeout(r),(l=n)==null||l.disconnect(),n=null}function a(l,u){l===void 0&&(l=!1),u===void 0&&(u=1),i();const{left:p,top:m,width:_,height:v}=e.getBoundingClientRect();if(l||t(),!_||!v)return;const C=Ld(m),b=Ld(o.clientWidth-(p+_)),y=Ld(o.clientHeight-(m+v)),N=Ld(p),O={rootMargin:-C+"px "+-b+"px "+-y+"px "+-N+"px",threshold:ro(0,Ia(1,u))||1};let k=!0;function I(M){const Y=M[0].intersectionRatio;if(Y!==u){if(!k)return a();Y?a(!1,Y):r=setTimeout(()=>{a(!1,1e-7)},1e3)}k=!1}try{n=new IntersectionObserver(I,{...O,root:o.ownerDocument})}catch{n=new IntersectionObserver(I,O)}n.observe(e)}return a(!0),i}function bM(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:u=!1}=r,p=tm(e),m=o||i?[...p?Su(p):[],...Su(t)]:[];m.forEach(R=>{o&&R.addEventListener("scroll",n,{passive:!0}),i&&R.addEventListener("resize",n)});const _=p&&l?yM(p,n):null;let v=-1,C=null;a&&(C=new ResizeObserver(R=>{let[O]=R;O&&O.target===p&&C&&(C.unobserve(t),cancelAnimationFrame(v),v=requestAnimationFrame(()=>{var k;(k=C)==null||k.observe(t)})),n()}),p&&!u&&C.observe(p),C.observe(t));let b,y=u?Cs(e):null;u&&N();function N(){const R=Cs(e);y&&(R.x!==y.x||R.y!==y.y||R.width!==y.width||R.height!==y.height)&&n(),y=R,b=requestAnimationFrame(N)}return n(),()=>{var R;m.forEach(O=>{o&&O.removeEventListener("scroll",n),i&&O.removeEventListener("resize",n)}),_==null||_(),(R=C)==null||R.disconnect(),C=null,u&&cancelAnimationFrame(b)}}const _M=XD,xM=QD,EM=qD,CM=tM,wM=ZD,Tb=YD,NM=eM,TM=(e,t,n)=>{const r=new Map,o={platform:vM,...n},i={...o.platform,_c:r};return VD(e,t,{...o,platform:i})};var tf=typeof document<"u"?z.useLayoutEffect:z.useEffect;function pf(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!pf(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!pf(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function BC(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Sb(e,t){const n=BC(e);return Math.round(t*n)/n}function ip(e){const t=de.useRef(e);return tf(()=>{t.current=e}),t}function SM(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:a}={},transform:l=!0,whileElementsMounted:u,open:p}=e,[m,_]=de.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[v,C]=de.useState(r);pf(v,r)||C(r);const[b,y]=de.useState(null),[N,R]=de.useState(null),O=de.useCallback(q=>{q!==Y.current&&(Y.current=q,y(q))},[]),k=de.useCallback(q=>{q!==ee.current&&(ee.current=q,R(q))},[]),I=i||b,M=a||N,Y=de.useRef(null),ee=de.useRef(null),re=de.useRef(m),Z=u!=null,U=ip(u),J=ip(o),fe=ip(p),ge=de.useCallback(()=>{if(!Y.current||!ee.current)return;const q={placement:t,strategy:n,middleware:v};J.current&&(q.platform=J.current),TM(Y.current,ee.current,q).then(ie=>{const H={...ie,isPositioned:fe.current!==!1};te.current&&!pf(re.current,H)&&(re.current=H,Ng.flushSync(()=>{_(H)}))})},[v,t,n,J,fe]);tf(()=>{p===!1&&re.current.isPositioned&&(re.current.isPositioned=!1,_(q=>({...q,isPositioned:!1})))},[p]);const te=de.useRef(!1);tf(()=>(te.current=!0,()=>{te.current=!1}),[]),tf(()=>{if(I&&(Y.current=I),M&&(ee.current=M),I&&M){if(U.current)return U.current(I,M,ge);ge()}},[I,M,ge,U,Z]);const he=de.useMemo(()=>({reference:Y,floating:ee,setReference:O,setFloating:k}),[O,k]),V=de.useMemo(()=>({reference:I,floating:M}),[I,M]),B=de.useMemo(()=>{const q={position:n,left:0,top:0};if(!V.floating)return q;const ie=Sb(V.floating,m.x),H=Sb(V.floating,m.y);return l?{...q,transform:"translate("+ie+"px, "+H+"px)",...BC(V.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:ie,top:H}},[n,l,V.floating,m.x,m.y]);return de.useMemo(()=>({...m,update:ge,refs:he,elements:V,floatingStyles:B}),[m,ge,he,V,B])}const OM=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?Tb({element:r.current,padding:o}).fn(n):{}:r?Tb({element:r,padding:o}).fn(n):{}}}},AM=(e,t)=>({..._M(e),options:[e,t]}),RM=(e,t)=>({...xM(e),options:[e,t]}),$M=(e,t)=>({...NM(e),options:[e,t]}),DM=(e,t)=>({...EM(e),options:[e,t]}),MM=(e,t)=>({...CM(e),options:[e,t]}),kM=(e,t)=>({...wM(e),options:[e,t]}),PM=(e,t)=>({...OM(e),options:[e,t]});var IM="Arrow",HC=de.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...i}=e;return ne.jsx(Mn.svg,{...i,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:ne.jsx("polygon",{points:"0,0 30,0 15,10"})})});HC.displayName=IM;var LM=HC;function rm(e){const[t,n]=de.useState(void 0);return Ji(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let a,l;if("borderBoxSize"in i){const u=i.borderBoxSize,p=Array.isArray(u)?u[0]:u;a=p.inlineSize,l=p.blockSize}else a=e.offsetWidth,l=e.offsetHeight;n({width:a,height:l})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var om="Popper",[WC,zC]=za(om),[FM,KC]=WC(om),GC=e=>{const{__scopePopper:t,children:n}=e,[r,o]=de.useState(null);return ne.jsx(FM,{scope:t,anchor:r,onAnchorChange:o,children:n})};GC.displayName=om;var UC="PopperAnchor",VC=de.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,i=KC(UC,n),a=de.useRef(null),l=er(t,a);return de.useEffect(()=>{i.onAnchorChange((r==null?void 0:r.current)||a.current)}),r?null:ne.jsx(Mn.div,{...o,ref:l})});VC.displayName=UC;var im="PopperContent",[jM,BM]=WC(im),YC=de.forwardRef((e,t)=>{var X,ue,pe,se,Ce,Se;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:i="center",alignOffset:a=0,arrowPadding:l=0,avoidCollisions:u=!0,collisionBoundary:p=[],collisionPadding:m=0,sticky:_="partial",hideWhenDetached:v=!1,updatePositionStrategy:C="optimized",onPlaced:b,...y}=e,N=KC(im,n),[R,O]=de.useState(null),k=er(t,He=>O(He)),[I,M]=de.useState(null),Y=rm(I),ee=(Y==null?void 0:Y.width)??0,re=(Y==null?void 0:Y.height)??0,Z=r+(i!=="center"?"-"+i:""),U=typeof m=="number"?m:{top:0,right:0,bottom:0,left:0,...m},J=Array.isArray(p)?p:[p],fe=J.length>0,ge={padding:U,boundary:J.filter(WM),altBoundary:fe},{refs:te,floatingStyles:he,placement:V,isPositioned:B,middlewareData:q}=SM({strategy:"fixed",placement:Z,whileElementsMounted:(...He)=>bM(...He,{animationFrame:C==="always"}),elements:{reference:N.anchor},middleware:[AM({mainAxis:o+re,alignmentAxis:a}),u&&RM({mainAxis:!0,crossAxis:!1,limiter:_==="partial"?$M():void 0,...ge}),u&&DM({...ge}),MM({...ge,apply:({elements:He,rects:le,availableWidth:ce,availableHeight:ve})=>{const{width:ke,height:Pe}=le.reference,Fe=He.floating.style;Fe.setProperty("--radix-popper-available-width",`${ce}px`),Fe.setProperty("--radix-popper-available-height",`${ve}px`),Fe.setProperty("--radix-popper-anchor-width",`${ke}px`),Fe.setProperty("--radix-popper-anchor-height",`${Pe}px`)}}),I&&PM({element:I,padding:l}),zM({arrowWidth:ee,arrowHeight:re}),v&&kM({strategy:"referenceHidden",...ge})]}),[ie,H]=JC(V),j=Zi(b);Ji(()=>{B&&(j==null||j())},[B,j]);const Q=(X=q.arrow)==null?void 0:X.x,F=(ue=q.arrow)==null?void 0:ue.y,w=((pe=q.arrow)==null?void 0:pe.centerOffset)!==0,[T,P]=de.useState();return Ji(()=>{R&&P(window.getComputedStyle(R).zIndex)},[R]),ne.jsx("div",{ref:te.setFloating,"data-radix-popper-content-wrapper":"",style:{...he,transform:B?he.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:T,"--radix-popper-transform-origin":[(se=q.transformOrigin)==null?void 0:se.x,(Ce=q.transformOrigin)==null?void 0:Ce.y].join(" "),...((Se=q.hide)==null?void 0:Se.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:ne.jsx(jM,{scope:n,placedSide:ie,onArrowChange:M,arrowX:Q,arrowY:F,shouldHideArrow:w,children:ne.jsx(Mn.div,{"data-side":ie,"data-align":H,...y,ref:k,style:{...y.style,animation:B?void 0:"none"}})})})});YC.displayName=im;var qC="PopperArrow",HM={top:"bottom",right:"left",bottom:"top",left:"right"},ZC=de.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,i=BM(qC,r),a=HM[i.placedSide];return ne.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:ne.jsx(LM,{...o,ref:n,style:{...o.style,display:"block"}})})});ZC.displayName=qC;function WM(e){return e!==null}var zM=e=>({name:"transformOrigin",options:e,fn(t){var N,R,O;const{placement:n,rects:r,middlewareData:o}=t,a=((N=o.arrow)==null?void 0:N.centerOffset)!==0,l=a?0:e.arrowWidth,u=a?0:e.arrowHeight,[p,m]=JC(n),_={start:"0%",center:"50%",end:"100%"}[m],v=(((R=o.arrow)==null?void 0:R.x)??0)+l/2,C=(((O=o.arrow)==null?void 0:O.y)??0)+u/2;let b="",y="";return p==="bottom"?(b=a?_:`${v}px`,y=`${-u}px`):p==="top"?(b=a?_:`${v}px`,y=`${r.floating.height+u}px`):p==="right"?(b=`${-u}px`,y=a?_:`${C}px`):p==="left"&&(b=`${r.floating.width+u}px`,y=a?_:`${C}px`),{data:{x:b,y}}}});function JC(e){const[t,n="center"]=e.split("-");return[t,n]}var KM=GC,GM=VC,UM=YC,VM=ZC,YM="Portal",XC=de.forwardRef((e,t)=>{var l;const{container:n,...r}=e,[o,i]=de.useState(!1);Ji(()=>i(!0),[]);const a=n||o&&((l=globalThis==null?void 0:globalThis.document)==null?void 0:l.body);return a?Ru.createPortal(ne.jsx(Mn.div,{...r,ref:t}),a):null});XC.displayName=YM;function qM(e,t){return de.useReducer((n,r)=>t[n][r]??n,e)}var Bu=e=>{const{present:t,children:n}=e,r=ZM(t),o=typeof n=="function"?n({present:r.isPresent}):de.Children.only(n),i=er(r.ref,JM(o));return typeof n=="function"||r.isPresent?de.cloneElement(o,{ref:i}):null};Bu.displayName="Presence";function ZM(e){const[t,n]=de.useState(),r=de.useRef({}),o=de.useRef(e),i=de.useRef("none"),a=e?"mounted":"unmounted",[l,u]=qM(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return de.useEffect(()=>{const p=Fd(r.current);i.current=l==="mounted"?p:"none"},[l]),Ji(()=>{const p=r.current,m=o.current;if(m!==e){const v=i.current,C=Fd(p);e?u("MOUNT"):C==="none"||(p==null?void 0:p.display)==="none"?u("UNMOUNT"):u(m&&v!==C?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,u]),Ji(()=>{if(t){const p=_=>{const C=Fd(r.current).includes(_.animationName);_.target===t&&C&&Ng.flushSync(()=>u("ANIMATION_END"))},m=_=>{_.target===t&&(i.current=Fd(r.current))};return t.addEventListener("animationstart",m),t.addEventListener("animationcancel",p),t.addEventListener("animationend",p),()=>{t.removeEventListener("animationstart",m),t.removeEventListener("animationcancel",p),t.removeEventListener("animationend",p)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:de.useCallback(p=>{p&&(r.current=getComputedStyle(p)),n(p)},[])}}function Fd(e){return(e==null?void 0:e.animationName)||"none"}function JM(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function Hu({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=XM({defaultProp:t,onChange:n}),i=e!==void 0,a=i?e:r,l=Zi(n),u=de.useCallback(p=>{if(i){const _=typeof p=="function"?p(e):p;_!==e&&l(_)}else o(p)},[i,e,o,l]);return[a,u]}function XM({defaultProp:e,onChange:t}){const n=de.useState(e),[r]=n,o=de.useRef(r),i=Zi(t);return de.useEffect(()=>{o.current!==r&&(i(r),o.current=r)},[r,o,i]),n}var QM="VisuallyHidden",QC=de.forwardRef((e,t)=>ne.jsx(Mn.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));QC.displayName=QM;var ek=QC,[Lf,uJ]=za("Tooltip",[zC]),Ff=zC(),ew="TooltipProvider",tk=700,Xp="tooltip.open",[nk,am]=Lf(ew),tw=e=>{const{__scopeTooltip:t,delayDuration:n=tk,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:i}=e,[a,l]=de.useState(!0),u=de.useRef(!1),p=de.useRef(0);return de.useEffect(()=>{const m=p.current;return()=>window.clearTimeout(m)},[]),ne.jsx(nk,{scope:t,isOpenDelayed:a,delayDuration:n,onOpen:de.useCallback(()=>{window.clearTimeout(p.current),l(!1)},[]),onClose:de.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>l(!0),r)},[r]),isPointerInTransitRef:u,onPointerInTransitChange:de.useCallback(m=>{u.current=m},[]),disableHoverableContent:o,children:i})};tw.displayName=ew;var jf="Tooltip",[rk,Bf]=Lf(jf),nw=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o=!1,onOpenChange:i,disableHoverableContent:a,delayDuration:l}=e,u=am(jf,e.__scopeTooltip),p=Ff(t),[m,_]=de.useState(null),v=xu(),C=de.useRef(0),b=a??u.disableHoverableContent,y=l??u.delayDuration,N=de.useRef(!1),[R=!1,O]=Hu({prop:r,defaultProp:o,onChange:ee=>{ee?(u.onOpen(),document.dispatchEvent(new CustomEvent(Xp))):u.onClose(),i==null||i(ee)}}),k=de.useMemo(()=>R?N.current?"delayed-open":"instant-open":"closed",[R]),I=de.useCallback(()=>{window.clearTimeout(C.current),N.current=!1,O(!0)},[O]),M=de.useCallback(()=>{window.clearTimeout(C.current),O(!1)},[O]),Y=de.useCallback(()=>{window.clearTimeout(C.current),C.current=window.setTimeout(()=>{N.current=!0,O(!0)},y)},[y,O]);return de.useEffect(()=>()=>window.clearTimeout(C.current),[]),ne.jsx(KM,{...p,children:ne.jsx(rk,{scope:t,contentId:v,open:R,stateAttribute:k,trigger:m,onTriggerChange:_,onTriggerEnter:de.useCallback(()=>{u.isOpenDelayed?Y():I()},[u.isOpenDelayed,Y,I]),onTriggerLeave:de.useCallback(()=>{b?M():window.clearTimeout(C.current)},[M,b]),onOpen:I,onClose:M,disableHoverableContent:b,children:n})})};nw.displayName=jf;var Qp="TooltipTrigger",rw=de.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Bf(Qp,n),i=am(Qp,n),a=Ff(n),l=de.useRef(null),u=er(t,l,o.onTriggerChange),p=de.useRef(!1),m=de.useRef(!1),_=de.useCallback(()=>p.current=!1,[]);return de.useEffect(()=>()=>document.removeEventListener("pointerup",_),[_]),ne.jsx(GM,{asChild:!0,...a,children:ne.jsx(Mn.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:u,onPointerMove:On(e.onPointerMove,v=>{v.pointerType!=="touch"&&!m.current&&!i.isPointerInTransitRef.current&&(o.onTriggerEnter(),m.current=!0)}),onPointerLeave:On(e.onPointerLeave,()=>{o.onTriggerLeave(),m.current=!1}),onPointerDown:On(e.onPointerDown,()=>{p.current=!0,document.addEventListener("pointerup",_,{once:!0})}),onFocus:On(e.onFocus,()=>{p.current||o.onOpen()}),onBlur:On(e.onBlur,o.onClose),onClick:On(e.onClick,o.onClose)})})});rw.displayName=Qp;var ok="TooltipPortal",[dJ,ik]=Lf(ok,{forceMount:void 0}),ql="TooltipContent",ow=de.forwardRef((e,t)=>{const n=ik(ql,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...i}=e,a=Bf(ql,e.__scopeTooltip);return ne.jsx(Bu,{present:r||a.open,children:a.disableHoverableContent?ne.jsx(iw,{side:o,...i,ref:t}):ne.jsx(ak,{side:o,...i,ref:t})})}),ak=de.forwardRef((e,t)=>{const n=Bf(ql,e.__scopeTooltip),r=am(ql,e.__scopeTooltip),o=de.useRef(null),i=er(t,o),[a,l]=de.useState(null),{trigger:u,onClose:p}=n,m=o.current,{onPointerInTransitChange:_}=r,v=de.useCallback(()=>{l(null),_(!1)},[_]),C=de.useCallback((b,y)=>{const N=b.currentTarget,R={x:b.clientX,y:b.clientY},O=ck(R,N.getBoundingClientRect()),k=uk(R,O),I=dk(y.getBoundingClientRect()),M=hk([...k,...I]);l(M),_(!0)},[_]);return de.useEffect(()=>()=>v(),[v]),de.useEffect(()=>{if(u&&m){const b=N=>C(N,m),y=N=>C(N,u);return u.addEventListener("pointerleave",b),m.addEventListener("pointerleave",y),()=>{u.removeEventListener("pointerleave",b),m.removeEventListener("pointerleave",y)}}},[u,m,C,v]),de.useEffect(()=>{if(a){const b=y=>{const N=y.target,R={x:y.clientX,y:y.clientY},O=(u==null?void 0:u.contains(N))||(m==null?void 0:m.contains(N)),k=!fk(R,a);O?v():k&&(v(),p())};return document.addEventListener("pointermove",b),()=>document.removeEventListener("pointermove",b)}},[u,m,a,p,v]),ne.jsx(iw,{...e,ref:i})}),[sk,lk]=Lf(jf,{isInside:!1}),iw=de.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:i,onPointerDownOutside:a,...l}=e,u=Bf(ql,n),p=Ff(n),{onClose:m}=u;return de.useEffect(()=>(document.addEventListener(Xp,m),()=>document.removeEventListener(Xp,m)),[m]),de.useEffect(()=>{if(u.trigger){const _=v=>{const C=v.target;C!=null&&C.contains(u.trigger)&&m()};return window.addEventListener("scroll",_,{capture:!0}),()=>window.removeEventListener("scroll",_,{capture:!0})}},[u.trigger,m]),ne.jsx(qg,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:_=>_.preventDefault(),onDismiss:m,children:ne.jsxs(UM,{"data-state":u.stateAttribute,...p,...l,ref:t,style:{...l.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[ne.jsx(Sg,{children:r}),ne.jsx(sk,{scope:n,isInside:!0,children:ne.jsx(ek,{id:u.contentId,role:"tooltip",children:o||r})})]})})});ow.displayName=ql;var aw="TooltipArrow",sw=de.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Ff(n);return lk(aw,n).isInside?null:ne.jsx(VM,{...o,...r,ref:t})});sw.displayName=aw;function ck(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(n,r,o,i)){case i:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function uk(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function dk(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function fk(e,t){const{x:n,y:r}=e;let o=!1;for(let i=0,a=t.length-1;i<t.length;a=i++){const l=t[i].x,u=t[i].y,p=t[a].x,m=t[a].y;u>r!=m>r&&n<(p-l)*(r-u)/(m-u)+l&&(o=!o)}return o}function hk(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),pk(t)}function pk(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const i=t[t.length-1],a=t[t.length-2];if((i.x-a.x)*(o.y-a.y)>=(i.y-a.y)*(o.x-a.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const i=n[n.length-1],a=n[n.length-2];if((i.x-a.x)*(o.y-a.y)>=(i.y-a.y)*(o.x-a.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var gk=tw,mk=nw,vk=rw,lw=ow,yk=sw;const sm="-";function bk(e){const t=xk(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;function o(a){const l=a.split(sm);return l[0]===""&&l.length!==1&&l.shift(),cw(l,t)||_k(a)}function i(a,l){const u=n[a]||[];return l&&r[a]?[...u,...r[a]]:u}return{getClassGroupId:o,getConflictingClassGroupIds:i}}function cw(e,t){var a;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?cw(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const i=e.join(sm);return(a=t.validators.find(({validator:l})=>l(i)))==null?void 0:a.classGroupId}const Ob=/^\[(.+)\]$/;function _k(e){if(Ob.test(e)){const t=Ob.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}}function xk(e){const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return Ck(Object.entries(e.classGroups),n).forEach(([i,a])=>{eg(a,r,i,t)}),r}function eg(e,t,n,r){e.forEach(o=>{if(typeof o=="string"){const i=o===""?t:Ab(t,o);i.classGroupId=n;return}if(typeof o=="function"){if(Ek(o)){eg(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([i,a])=>{eg(a,Ab(t,i),n,r)})})}function Ab(e,t){let n=e;return t.split(sm).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n}function Ek(e){return e.isThemeGetter}function Ck(e,t){return t?e.map(([n,r])=>{const o=r.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([a,l])=>[t+a,l])):i);return[n,o]}):e}function wk(e){if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;function o(i,a){n.set(i,a),t++,t>e&&(t=0,r=n,n=new Map)}return{get(i){let a=n.get(i);if(a!==void 0)return a;if((a=r.get(i))!==void 0)return o(i,a),a},set(i,a){n.has(i)?n.set(i,a):o(i,a)}}}const uw="!";function Nk(e){const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,o=t[0],i=t.length;function a(l){const u=[];let p=0,m=0,_;for(let N=0;N<l.length;N++){let R=l[N];if(p===0){if(R===o&&(r||l.slice(N,N+i)===t)){u.push(l.slice(m,N)),m=N+i;continue}if(R==="/"){_=N;continue}}R==="["?p++:R==="]"&&p--}const v=u.length===0?l:l.substring(m),C=v.startsWith(uw),b=C?v.substring(1):v,y=_&&_>m?_-m:void 0;return{modifiers:u,hasImportantModifier:C,baseClassName:b,maybePostfixModifierPosition:y}}return n?function(u){return n({className:u,parseClassName:a})}:a}function Tk(e){if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t}function Sk(e){return{cache:wk(e.cacheSize),parseClassName:Nk(e),...bk(e)}}const Ok=/\s+/;function Ak(e,t){const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,i=new Set;return e.trim().split(Ok).map(a=>{const{modifiers:l,hasImportantModifier:u,baseClassName:p,maybePostfixModifierPosition:m}=n(a);let _=!!m,v=r(_?p.substring(0,m):p);if(!v){if(!_)return{isTailwindClass:!1,originalClassName:a};if(v=r(p),!v)return{isTailwindClass:!1,originalClassName:a};_=!1}const C=Tk(l).join(":");return{isTailwindClass:!0,modifierId:u?C+uw:C,classGroupId:v,originalClassName:a,hasPostfixModifier:_}}).reverse().filter(a=>{if(!a.isTailwindClass)return!0;const{modifierId:l,classGroupId:u,hasPostfixModifier:p}=a,m=l+u;return i.has(m)?!1:(i.add(m),o(u,p).forEach(_=>i.add(l+_)),!0)}).reverse().map(a=>a.originalClassName).join(" ")}function Rk(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=dw(t))&&(r&&(r+=" "),r+=n);return r}function dw(e){if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=dw(e[r]))&&(n&&(n+=" "),n+=t);return n}function $k(e,...t){let n,r,o,i=a;function a(u){const p=t.reduce((m,_)=>_(m),e());return n=Sk(p),r=n.cache.get,o=n.cache.set,i=l,l(u)}function l(u){const p=r(u);if(p)return p;const m=Ak(u,n);return o(u,m),m}return function(){return i(Rk.apply(null,arguments))}}function Nn(e){const t=n=>n[e]||[];return t.isThemeGetter=!0,t}const fw=/^\[(?:([a-z-]+):)?(.+)\]$/i,Dk=/^\d+\/\d+$/,Mk=new Set(["px","full","screen"]),kk=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Pk=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Ik=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Lk=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Fk=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;function Gi(e){return xs(e)||Mk.has(e)||Dk.test(e)}function Oa(e){return ic(e,"length",Uk)}function xs(e){return!!e&&!Number.isNaN(Number(e))}function jd(e){return ic(e,"number",xs)}function lu(e){return!!e&&Number.isInteger(Number(e))}function jk(e){return e.endsWith("%")&&xs(e.slice(0,-1))}function Ut(e){return fw.test(e)}function Aa(e){return kk.test(e)}const Bk=new Set(["length","size","percentage"]);function Hk(e){return ic(e,Bk,hw)}function Wk(e){return ic(e,"position",hw)}const zk=new Set(["image","url"]);function Kk(e){return ic(e,zk,Yk)}function Gk(e){return ic(e,"",Vk)}function cu(){return!0}function ic(e,t,n){const r=fw.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1}function Uk(e){return Pk.test(e)&&!Ik.test(e)}function hw(){return!1}function Vk(e){return Lk.test(e)}function Yk(e){return Fk.test(e)}function qk(){const e=Nn("colors"),t=Nn("spacing"),n=Nn("blur"),r=Nn("brightness"),o=Nn("borderColor"),i=Nn("borderRadius"),a=Nn("borderSpacing"),l=Nn("borderWidth"),u=Nn("contrast"),p=Nn("grayscale"),m=Nn("hueRotate"),_=Nn("invert"),v=Nn("gap"),C=Nn("gradientColorStops"),b=Nn("gradientColorStopPositions"),y=Nn("inset"),N=Nn("margin"),R=Nn("opacity"),O=Nn("padding"),k=Nn("saturate"),I=Nn("scale"),M=Nn("sepia"),Y=Nn("skew"),ee=Nn("space"),re=Nn("translate"),Z=()=>["auto","contain","none"],U=()=>["auto","hidden","clip","visible","scroll"],J=()=>["auto",Ut,t],fe=()=>[Ut,t],ge=()=>["",Gi,Oa],te=()=>["auto",xs,Ut],he=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],V=()=>["solid","dashed","dotted","double","none"],B=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],q=()=>["start","end","center","between","around","evenly","stretch"],ie=()=>["","0",Ut],H=()=>["auto","avoid","all","avoid-page","page","left","right","column"],j=()=>[xs,jd],Q=()=>[xs,Ut];return{cacheSize:500,separator:":",theme:{colors:[cu],spacing:[Gi,Oa],blur:["none","",Aa,Ut],brightness:j(),borderColor:[e],borderRadius:["none","","full",Aa,Ut],borderSpacing:fe(),borderWidth:ge(),contrast:j(),grayscale:ie(),hueRotate:Q(),invert:ie(),gap:fe(),gradientColorStops:[e],gradientColorStopPositions:[jk,Oa],inset:J(),margin:J(),opacity:j(),padding:fe(),saturate:j(),scale:j(),sepia:ie(),skew:Q(),space:fe(),translate:fe()},classGroups:{aspect:[{aspect:["auto","square","video",Ut]}],container:["container"],columns:[{columns:[Aa]}],"break-after":[{"break-after":H()}],"break-before":[{"break-before":H()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...he(),Ut]}],overflow:[{overflow:U()}],"overflow-x":[{"overflow-x":U()}],"overflow-y":[{"overflow-y":U()}],overscroll:[{overscroll:Z()}],"overscroll-x":[{"overscroll-x":Z()}],"overscroll-y":[{"overscroll-y":Z()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[y]}],"inset-x":[{"inset-x":[y]}],"inset-y":[{"inset-y":[y]}],start:[{start:[y]}],end:[{end:[y]}],top:[{top:[y]}],right:[{right:[y]}],bottom:[{bottom:[y]}],left:[{left:[y]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",lu,Ut]}],basis:[{basis:J()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Ut]}],grow:[{grow:ie()}],shrink:[{shrink:ie()}],order:[{order:["first","last","none",lu,Ut]}],"grid-cols":[{"grid-cols":[cu]}],"col-start-end":[{col:["auto",{span:["full",lu,Ut]},Ut]}],"col-start":[{"col-start":te()}],"col-end":[{"col-end":te()}],"grid-rows":[{"grid-rows":[cu]}],"row-start-end":[{row:["auto",{span:[lu,Ut]},Ut]}],"row-start":[{"row-start":te()}],"row-end":[{"row-end":te()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Ut]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Ut]}],gap:[{gap:[v]}],"gap-x":[{"gap-x":[v]}],"gap-y":[{"gap-y":[v]}],"justify-content":[{justify:["normal",...q()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...q(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...q(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[O]}],px:[{px:[O]}],py:[{py:[O]}],ps:[{ps:[O]}],pe:[{pe:[O]}],pt:[{pt:[O]}],pr:[{pr:[O]}],pb:[{pb:[O]}],pl:[{pl:[O]}],m:[{m:[N]}],mx:[{mx:[N]}],my:[{my:[N]}],ms:[{ms:[N]}],me:[{me:[N]}],mt:[{mt:[N]}],mr:[{mr:[N]}],mb:[{mb:[N]}],ml:[{ml:[N]}],"space-x":[{"space-x":[ee]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[ee]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Ut,t]}],"min-w":[{"min-w":[Ut,t,"min","max","fit"]}],"max-w":[{"max-w":[Ut,t,"none","full","min","max","fit","prose",{screen:[Aa]},Aa]}],h:[{h:[Ut,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Ut,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Ut,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Ut,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Aa,Oa]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",jd]}],"font-family":[{font:[cu]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Ut]}],"line-clamp":[{"line-clamp":["none",xs,jd]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Gi,Ut]}],"list-image":[{"list-image":["none",Ut]}],"list-style-type":[{list:["none","disc","decimal",Ut]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[R]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[R]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...V(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Gi,Oa]}],"underline-offset":[{"underline-offset":["auto",Gi,Ut]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:fe()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ut]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Ut]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[R]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...he(),Wk]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Hk]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Kk]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[b]}],"gradient-via-pos":[{via:[b]}],"gradient-to-pos":[{to:[b]}],"gradient-from":[{from:[C]}],"gradient-via":[{via:[C]}],"gradient-to":[{to:[C]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[l]}],"border-w-x":[{"border-x":[l]}],"border-w-y":[{"border-y":[l]}],"border-w-s":[{"border-s":[l]}],"border-w-e":[{"border-e":[l]}],"border-w-t":[{"border-t":[l]}],"border-w-r":[{"border-r":[l]}],"border-w-b":[{"border-b":[l]}],"border-w-l":[{"border-l":[l]}],"border-opacity":[{"border-opacity":[R]}],"border-style":[{border:[...V(),"hidden"]}],"divide-x":[{"divide-x":[l]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[l]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[R]}],"divide-style":[{divide:V()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...V()]}],"outline-offset":[{"outline-offset":[Gi,Ut]}],"outline-w":[{outline:[Gi,Oa]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:ge()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[R]}],"ring-offset-w":[{"ring-offset":[Gi,Oa]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Aa,Gk]}],"shadow-color":[{shadow:[cu]}],opacity:[{opacity:[R]}],"mix-blend":[{"mix-blend":[...B(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":B()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[u]}],"drop-shadow":[{"drop-shadow":["","none",Aa,Ut]}],grayscale:[{grayscale:[p]}],"hue-rotate":[{"hue-rotate":[m]}],invert:[{invert:[_]}],saturate:[{saturate:[k]}],sepia:[{sepia:[M]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[u]}],"backdrop-grayscale":[{"backdrop-grayscale":[p]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[m]}],"backdrop-invert":[{"backdrop-invert":[_]}],"backdrop-opacity":[{"backdrop-opacity":[R]}],"backdrop-saturate":[{"backdrop-saturate":[k]}],"backdrop-sepia":[{"backdrop-sepia":[M]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[a]}],"border-spacing-x":[{"border-spacing-x":[a]}],"border-spacing-y":[{"border-spacing-y":[a]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Ut]}],duration:[{duration:Q()}],ease:[{ease:["linear","in","out","in-out",Ut]}],delay:[{delay:Q()}],animate:[{animate:["none","spin","ping","pulse","bounce",Ut]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[I]}],"scale-x":[{"scale-x":[I]}],"scale-y":[{"scale-y":[I]}],rotate:[{rotate:[lu,Ut]}],"translate-x":[{"translate-x":[re]}],"translate-y":[{"translate-y":[re]}],"skew-x":[{"skew-x":[Y]}],"skew-y":[{"skew-y":[Y]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Ut]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Ut]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":fe()}],"scroll-mx":[{"scroll-mx":fe()}],"scroll-my":[{"scroll-my":fe()}],"scroll-ms":[{"scroll-ms":fe()}],"scroll-me":[{"scroll-me":fe()}],"scroll-mt":[{"scroll-mt":fe()}],"scroll-mr":[{"scroll-mr":fe()}],"scroll-mb":[{"scroll-mb":fe()}],"scroll-ml":[{"scroll-ml":fe()}],"scroll-p":[{"scroll-p":fe()}],"scroll-px":[{"scroll-px":fe()}],"scroll-py":[{"scroll-py":fe()}],"scroll-ps":[{"scroll-ps":fe()}],"scroll-pe":[{"scroll-pe":fe()}],"scroll-pt":[{"scroll-pt":fe()}],"scroll-pr":[{"scroll-pr":fe()}],"scroll-pb":[{"scroll-pb":fe()}],"scroll-pl":[{"scroll-pl":fe()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Ut]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Gi,Oa,jd]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}}const Zk=$k(qk);function gn(...e){return Zk($u(e))}const pw=gk,gw=mk,mw=vk,vw=yk,lm=de.forwardRef(({className:e,sideOffset:t=4,...n},r)=>ne.jsx(lw,{ref:r,sideOffset:t,className:gn("ve-z-50 ve-overflow-hidden ve-rounded-[6px] ve-bg-popover ve-px-3 ve-py-1.5 ve-text-sm ve-text-popover-foreground",e),...n}));lm.displayName=lw.displayName;const _o=({displayName:e,fieldId:t,constantValueEnabled:n,children:r})=>{const{tooltipsVisible:o}=_w();if(!o)return r;let i="";return e&&t?i=`${e} (${t})`:t?i=`${t}`:e&&(i=`${e}`),ne.jsx("div",{children:ne.jsx(pw,{children:ne.jsxs(gw,{open:!!i&&!n,children:[ne.jsx(mw,{asChild:!0,children:ne.jsx("div",{className:"ve-outline-2 ve-outline-dotted ve-outline-[#5A58F2]",children:r})}),ne.jsxs(lm,{children:[ne.jsx("p",{children:i}),ne.jsx(vw,{fill:"bg-popover"})]})]})})})},yw=z.createContext(void 0),bw=({children:e})=>{const[t,n]=z.useState(!1),r=()=>{n(o=>!o)};return ne.jsx(yw.Provider,{value:{tooltipsVisible:t,toggleTooltips:r},children:e})},_w=()=>{const e=z.useContext(yw);return e||{tooltipsVisible:!1,toggleTooltips:()=>{}}},cr=["http://localhost","https://dev.yext.com","https://qa.yext.com","https://sandbox.yext.com","https://www.yext.com","https://app-qa.eu.yext.com","https://app.eu.yext.com"],xw=(e,t,n="*")=>t==null?void 0:t.postMessage(e,{targetOrigin:n}),Bo=(e,t)=>{const[n,r]=z.useState("pending");return Ew(e,t,Jk(r)),{sendToParent:i=>{if(!window.parent)throw new Error("Parent window has closed");r("pending");for(const a of t)xw({...i,type:e},window.parent,a)},status:n}},ka=(e,t,n)=>{Ew(e,t,(o,i,a)=>{const{type:l,payload:u}=o;l===e&&typeof n=="function"&&n(p=>xw({...p,type:e},a,i),u)})},Ew=(e,t,n)=>{const[r,o]=z.useState(),[i,a]=z.useState(),l=z.useRef(),u=z.useRef();l.current=r,u.current=i;const p=z.useCallback(({origin:m,source:_,data:v})=>{var b;if((b=v==null?void 0:v.source)!=null&&b.startsWith("react-devtools")||!t.includes(m))return;const{type:C}=v;C===e&&(a(_),o(m),n(v,m,_))},[e,t,a,o,n]);z.useEffect(()=>(window.addEventListener("message",p),()=>window.removeEventListener("message",p)),[e,i,r,p])},Jk=e=>(t,n,r)=>{const{status:o}=t;o==="success"?e("success"):o==="error"&&e("error")},Xk=()=>{const[e,t]=z.useState(void 0);return ka("getTemplateStream",cr,(n,r)=>{t(r.stream.schema.fields),n({status:"success",payload:{message:"templateStream received"}})}),ka("getDevEntityFields",cr,(n,r)=>{t(Cw(r)),n({status:"success",payload:{message:"getDevEntityFields received"}})}),e},Cw=e=>e.map(t=>({name:t.name,definition:{name:t.name,typeName:t.typeName,type:t.type,registryId:t.registryId,typeRegistryId:t.typeRegistryId,isList:t.isList},children:t.children?{fields:Cw(t.children)}:{}})),ww=de.createContext(void 0),Qk=({entityFields:e,children:t})=>ne.jsx(ww.Provider,{value:e,children:t}),Nw=()=>{const e=de.useContext(ww);if(!e)throw new Error("useEntityFields must be used within a DocumentProvider");return e},eP=["uid","meta","slug","c_visualConfigurations","c_pages_layouts"],tP=[],Tw=e=>Sw(e,""),Sw=(e,t)=>{var o,i,a;const n=t?`${t}.${e.name}`:e.name;if(tP.includes(Ow(e)))return[{name:n,schemaField:e}];if(e.definition.isList)return[{name:n,schemaField:e}];const r=[{name:n,schemaField:e}];if((o=e.children)!=null&&o.fields&&((a=(i=e.children)==null?void 0:i.fields)==null?void 0:a.length)>0)for(const l of e.children.fields)r.push(...Sw(l,n));return r},Ow=e=>e.definition.typeName||e.definition.typeRegistryId||Object.entries(e.definition.type)[0][1];function nP(e,t,n){const r=e.get(t)||[];return r.push(n),e.set(t,r),e}const rP=e=>e.reduce((t,n)=>{const r=Tw(n);for(const o of r){const i=Ow(o.schemaField);i&&(t=nP(t,i,o.name))}return t},new Map),oP=e=>{let n=Nw().filter(o=>!eP.includes(o.name));if(e!=null&&e.allowList){const o=n.map(i=>i.name);e.allowList.forEach(i=>{o.includes(i)||console.warn(`The entity field filter allowList included ${i}, which does not exist in the stream.`)}),n=n.filter(i=>e.allowList.includes(i.name))}e!=null&&e.disallowList&&(n=n.filter(o=>!e.disallowList.includes(o.name)));let r=[];for(const o of n){const i=Tw(o);for(const a of i)r.push({...a.schemaField,name:a.name})}if(e!=null&&e.types){const o=rP(r),i=[];e.types.forEach(a=>{i.push(...r.filter(l=>{var u;return(u=o.get(a))==null?void 0:u.includes(l.name)}))}),r=i}return r=r.filter(o=>!!o.definition.isList==!!(e!=null&&e.includeListsOnly)),r};function Aw(e,t=[]){let n=[];function r(i,a){const l=de.createContext(a),u=n.length;n=[...n,a];const p=_=>{var R;const{scope:v,children:C,...b}=_,y=((R=v==null?void 0:v[e])==null?void 0:R[u])||l,N=de.useMemo(()=>b,Object.values(b));return ne.jsx(y.Provider,{value:N,children:C})};p.displayName=i+"Provider";function m(_,v){var y;const C=((y=v==null?void 0:v[e])==null?void 0:y[u])||l,b=de.useContext(C);if(b)return b;if(a!==void 0)return a;throw new Error(`\`${_}\` must be used within \`${i}\``)}return[p,m]}const o=()=>{const i=n.map(a=>de.createContext(a));return function(l){const u=(l==null?void 0:l[e])||i;return de.useMemo(()=>({[`__scope${e}`]:{...l,[e]:u}}),[l,u])}};return o.scopeName=e,[r,iP(o,...t)]}function iP(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const a=r.reduce((l,{useScope:u,scopeName:p})=>{const _=u(i)[`__scope${p}`];return{...l,..._}},{});return de.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function aP(e){const t=e+"CollectionProvider",[n,r]=za(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=C=>{const{scope:b,children:y}=C,N=z.useRef(null),R=z.useRef(new Map).current;return ne.jsx(o,{scope:b,itemMap:R,collectionRef:N,children:y})};a.displayName=t;const l=e+"CollectionSlot",u=z.forwardRef((C,b)=>{const{scope:y,children:N}=C,R=i(l,y),O=er(b,R.collectionRef);return ne.jsx(Pa,{ref:O,children:N})});u.displayName=l;const p=e+"CollectionItemSlot",m="data-radix-collection-item",_=z.forwardRef((C,b)=>{const{scope:y,children:N,...R}=C,O=z.useRef(null),k=er(b,O),I=i(p,y);return z.useEffect(()=>(I.itemMap.set(O,{ref:O,...R}),()=>void I.itemMap.delete(O))),ne.jsx(Pa,{[m]:"",ref:k,children:N})});_.displayName=p;function v(C){const b=i(e+"CollectionConsumer",C);return z.useCallback(()=>{const N=b.collectionRef.current;if(!N)return[];const R=Array.from(N.querySelectorAll(`[${m}]`));return Array.from(b.itemMap.values()).sort((I,M)=>R.indexOf(I.ref.current)-R.indexOf(M.ref.current))},[b.collectionRef,b.itemMap])}return[{Provider:a,Slot:u,ItemSlot:_},v,r]}var sP=de.createContext(void 0);function Rw(e){const t=de.useContext(sP);return e||t||"ltr"}var ap="rovingFocusGroup.onEntryFocus",lP={bubbles:!1,cancelable:!0},Hf="RovingFocusGroup",[tg,$w,cP]=aP(Hf),[uP,Dw]=za(Hf,[cP]),[dP,fP]=uP(Hf),Mw=de.forwardRef((e,t)=>ne.jsx(tg.Provider,{scope:e.__scopeRovingFocusGroup,children:ne.jsx(tg.Slot,{scope:e.__scopeRovingFocusGroup,children:ne.jsx(hP,{...e,ref:t})})}));Mw.displayName=Hf;var hP=de.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:i,currentTabStopId:a,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:u,onEntryFocus:p,preventScrollOnEntryFocus:m=!1,..._}=e,v=de.useRef(null),C=er(t,v),b=Rw(i),[y=null,N]=Hu({prop:a,defaultProp:l,onChange:u}),[R,O]=de.useState(!1),k=Zi(p),I=$w(n),M=de.useRef(!1),[Y,ee]=de.useState(0);return de.useEffect(()=>{const re=v.current;if(re)return re.addEventListener(ap,k),()=>re.removeEventListener(ap,k)},[k]),ne.jsx(dP,{scope:n,orientation:r,dir:b,loop:o,currentTabStopId:y,onItemFocus:de.useCallback(re=>N(re),[N]),onItemShiftTab:de.useCallback(()=>O(!0),[]),onFocusableItemAdd:de.useCallback(()=>ee(re=>re+1),[]),onFocusableItemRemove:de.useCallback(()=>ee(re=>re-1),[]),children:ne.jsx(Mn.div,{tabIndex:R||Y===0?-1:0,"data-orientation":r,..._,ref:C,style:{outline:"none",...e.style},onMouseDown:On(e.onMouseDown,()=>{M.current=!0}),onFocus:On(e.onFocus,re=>{const Z=!M.current;if(re.target===re.currentTarget&&Z&&!R){const U=new CustomEvent(ap,lP);if(re.currentTarget.dispatchEvent(U),!U.defaultPrevented){const J=I().filter(V=>V.focusable),fe=J.find(V=>V.active),ge=J.find(V=>V.id===y),he=[fe,ge,...J].filter(Boolean).map(V=>V.ref.current);Iw(he,m)}}M.current=!1}),onBlur:On(e.onBlur,()=>O(!1))})})}),kw="RovingFocusGroupItem",Pw=de.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:i,...a}=e,l=xu(),u=i||l,p=fP(kw,n),m=p.currentTabStopId===u,_=$w(n),{onFocusableItemAdd:v,onFocusableItemRemove:C}=p;return de.useEffect(()=>{if(r)return v(),()=>C()},[r,v,C]),ne.jsx(tg.ItemSlot,{scope:n,id:u,focusable:r,active:o,children:ne.jsx(Mn.span,{tabIndex:m?0:-1,"data-orientation":p.orientation,...a,ref:t,onMouseDown:On(e.onMouseDown,b=>{r?p.onItemFocus(u):b.preventDefault()}),onFocus:On(e.onFocus,()=>p.onItemFocus(u)),onKeyDown:On(e.onKeyDown,b=>{if(b.key==="Tab"&&b.shiftKey){p.onItemShiftTab();return}if(b.target!==b.currentTarget)return;const y=mP(b,p.orientation,p.dir);if(y!==void 0){if(b.metaKey||b.ctrlKey||b.altKey||b.shiftKey)return;b.preventDefault();let R=_().filter(O=>O.focusable).map(O=>O.ref.current);if(y==="last")R.reverse();else if(y==="prev"||y==="next"){y==="prev"&&R.reverse();const O=R.indexOf(b.currentTarget);R=p.loop?vP(R,O+1):R.slice(O+1)}setTimeout(()=>Iw(R))}})})})});Pw.displayName=kw;var pP={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function gP(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function mP(e,t,n){const r=gP(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return pP[r]}function Iw(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function vP(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var yP=Mw,bP=Pw;function Lw(e){const t=de.useRef({value:e,previous:e});return de.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function _P(e,t){return de.useReducer((n,r)=>t[n][r]??n,e)}var Fw=e=>{const{present:t,children:n}=e,r=xP(t),o=typeof n=="function"?n({present:r.isPresent}):de.Children.only(n),i=er(r.ref,EP(o));return typeof n=="function"||r.isPresent?de.cloneElement(o,{ref:i}):null};Fw.displayName="Presence";function xP(e){const[t,n]=de.useState(),r=de.useRef({}),o=de.useRef(e),i=de.useRef("none"),a=e?"mounted":"unmounted",[l,u]=_P(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return de.useEffect(()=>{const p=Bd(r.current);i.current=l==="mounted"?p:"none"},[l]),Ji(()=>{const p=r.current,m=o.current;if(m!==e){const v=i.current,C=Bd(p);e?u("MOUNT"):C==="none"||(p==null?void 0:p.display)==="none"?u("UNMOUNT"):u(m&&v!==C?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,u]),Ji(()=>{if(t){let p;const m=t.ownerDocument.defaultView??window,_=C=>{const y=Bd(r.current).includes(C.animationName);if(C.target===t&&y&&(u("ANIMATION_END"),!o.current)){const N=t.style.animationFillMode;t.style.animationFillMode="forwards",p=m.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=N)})}},v=C=>{C.target===t&&(i.current=Bd(r.current))};return t.addEventListener("animationstart",v),t.addEventListener("animationcancel",_),t.addEventListener("animationend",_),()=>{m.clearTimeout(p),t.removeEventListener("animationstart",v),t.removeEventListener("animationcancel",_),t.removeEventListener("animationend",_)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:de.useCallback(p=>{p&&(r.current=getComputedStyle(p)),n(p)},[])}}function Bd(e){return(e==null?void 0:e.animationName)||"none"}function EP(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var cm="Radio",[CP,jw]=Aw(cm),[wP,NP]=CP(cm),Bw=de.forwardRef((e,t)=>{const{__scopeRadio:n,name:r,checked:o=!1,required:i,disabled:a,value:l="on",onCheck:u,form:p,...m}=e,[_,v]=de.useState(null),C=er(t,N=>v(N)),b=de.useRef(!1),y=_?p||!!_.closest("form"):!0;return ne.jsxs(wP,{scope:n,checked:o,disabled:a,children:[ne.jsx(Mn.button,{type:"button",role:"radio","aria-checked":o,"data-state":zw(o),"data-disabled":a?"":void 0,disabled:a,value:l,...m,ref:C,onClick:On(e.onClick,N=>{o||u==null||u(),y&&(b.current=N.isPropagationStopped(),b.current||N.stopPropagation())})}),y&&ne.jsx(TP,{control:_,bubbles:!b.current,name:r,value:l,checked:o,required:i,disabled:a,form:p,style:{transform:"translateX(-100%)"}})]})});Bw.displayName=cm;var Hw="RadioIndicator",Ww=de.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:r,...o}=e,i=NP(Hw,n);return ne.jsx(Fw,{present:r||i.checked,children:ne.jsx(Mn.span,{"data-state":zw(i.checked),"data-disabled":i.disabled?"":void 0,...o,ref:t})})});Ww.displayName=Hw;var TP=e=>{const{control:t,checked:n,bubbles:r=!0,...o}=e,i=de.useRef(null),a=Lw(n),l=rm(t);return de.useEffect(()=>{const u=i.current,p=window.HTMLInputElement.prototype,_=Object.getOwnPropertyDescriptor(p,"checked").set;if(a!==n&&_){const v=new Event("click",{bubbles:r});_.call(u,n),u.dispatchEvent(v)}},[a,n,r]),ne.jsx("input",{type:"radio","aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:i,style:{...e.style,...l,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function zw(e){return e?"checked":"unchecked"}var SP=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],um="RadioGroup",[OP,fJ]=Aw(um,[Dw,jw]),Kw=Dw(),Gw=jw(),[AP,RP]=OP(um),Uw=de.forwardRef((e,t)=>{const{__scopeRadioGroup:n,name:r,defaultValue:o,value:i,required:a=!1,disabled:l=!1,orientation:u,dir:p,loop:m=!0,onValueChange:_,...v}=e,C=Kw(n),b=Rw(p),[y,N]=Hu({prop:i,defaultProp:o,onChange:_});return ne.jsx(AP,{scope:n,name:r,required:a,disabled:l,value:y,onValueChange:N,children:ne.jsx(yP,{asChild:!0,...C,orientation:u,dir:b,loop:m,children:ne.jsx(Mn.div,{role:"radiogroup","aria-required":a,"aria-orientation":u,"data-disabled":l?"":void 0,dir:b,...v,ref:t})})})});Uw.displayName=um;var Vw="RadioGroupItem",Yw=de.forwardRef((e,t)=>{const{__scopeRadioGroup:n,disabled:r,...o}=e,i=RP(Vw,n),a=i.disabled||r,l=Kw(n),u=Gw(n),p=de.useRef(null),m=er(t,p),_=i.value===o.value,v=de.useRef(!1);return de.useEffect(()=>{const C=y=>{SP.includes(y.key)&&(v.current=!0)},b=()=>v.current=!1;return document.addEventListener("keydown",C),document.addEventListener("keyup",b),()=>{document.removeEventListener("keydown",C),document.removeEventListener("keyup",b)}},[]),ne.jsx(bP,{asChild:!0,...l,focusable:!a,active:_,children:ne.jsx(Bw,{disabled:a,required:i.required,checked:_,...u,...o,name:i.name,ref:m,onCheck:()=>i.onValueChange(o.value),onKeyDown:On(C=>{C.key==="Enter"&&C.preventDefault()}),onFocus:On(o.onFocus,()=>{var C;v.current&&((C=p.current)==null||C.click())})})})});Yw.displayName=Vw;var $P="RadioGroupIndicator",qw=de.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...r}=e,o=Gw(n);return ne.jsx(Ww,{...o,...r,ref:t})});qw.displayName=$P;var Zw=Uw,Jw=Yw,DP=qw;/**
|
|
125
|
-
* @license lucide-react v0.414.0 - ISC
|
|
126
|
-
*
|
|
127
|
-
* This source code is licensed under the ISC license.
|
|
128
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
129
|
-
*/const MP=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Xw=(...e)=>e.filter((t,n,r)=>!!t&&r.indexOf(t)===n).join(" ");/**
|
|
130
|
-
* @license lucide-react v0.414.0 - ISC
|
|
131
|
-
*
|
|
132
|
-
* This source code is licensed under the ISC license.
|
|
133
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
134
|
-
*/var kP={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
135
|
-
* @license lucide-react v0.414.0 - ISC
|
|
136
|
-
*
|
|
137
|
-
* This source code is licensed under the ISC license.
|
|
138
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
139
|
-
*/const PP=z.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:i,iconNode:a,...l},u)=>z.createElement("svg",{ref:u,...kP,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Xw("lucide",o),...l},[...a.map(([p,m])=>z.createElement(p,m)),...Array.isArray(i)?i:[i]]));/**
|
|
140
|
-
* @license lucide-react v0.414.0 - ISC
|
|
141
|
-
*
|
|
142
|
-
* This source code is licensed under the ISC license.
|
|
143
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
144
|
-
*/const Os=(e,t)=>{const n=z.forwardRef(({className:r,...o},i)=>z.createElement(PP,{ref:i,iconNode:t,className:Xw(`lucide-${MP(e)}`,r),...o}));return n.displayName=`${e}`,n};/**
|
|
145
|
-
* @license lucide-react v0.414.0 - ISC
|
|
146
|
-
*
|
|
147
|
-
* This source code is licensed under the ISC license.
|
|
148
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
149
|
-
*/const IP=Os("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
|
|
150
|
-
* @license lucide-react v0.414.0 - ISC
|
|
151
|
-
*
|
|
152
|
-
* This source code is licensed under the ISC license.
|
|
153
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
154
|
-
*/const LP=Os("PanelLeft",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]]);/**
|
|
155
|
-
* @license lucide-react v0.414.0 - ISC
|
|
156
|
-
*
|
|
157
|
-
* This source code is licensed under the ISC license.
|
|
158
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
159
|
-
*/const FP=Os("PanelRight",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 3v18",key:"14nvp0"}]]);/**
|
|
160
|
-
* @license lucide-react v0.414.0 - ISC
|
|
161
|
-
*
|
|
162
|
-
* This source code is licensed under the ISC license.
|
|
163
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
164
|
-
*/const jP=Os("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
|
|
165
|
-
* @license lucide-react v0.414.0 - ISC
|
|
166
|
-
*
|
|
167
|
-
* This source code is licensed under the ISC license.
|
|
168
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
169
|
-
*/const BP=Os("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);/**
|
|
170
|
-
* @license lucide-react v0.414.0 - ISC
|
|
171
|
-
*
|
|
172
|
-
* This source code is licensed under the ISC license.
|
|
173
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
174
|
-
*/const HP=Os("RotateCw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]]);/**
|
|
175
|
-
* @license lucide-react v0.414.0 - ISC
|
|
176
|
-
*
|
|
177
|
-
* This source code is licensed under the ISC license.
|
|
178
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
179
|
-
*/const WP=Os("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]),Qw=de.forwardRef(({className:e,...t},n)=>ne.jsx(Zw,{className:gn("ve-grid ve-gap-2",e),...t,ref:n}));Qw.displayName=Zw.displayName;const ng=de.forwardRef(({className:e,...t},n)=>ne.jsx(Jw,{ref:n,className:gn("ve-aspect-square ve-h-4 ve-w-4 ve-rounded-full ve-border ve-border-[#dcdcdc] ve-ring-offset focus:ve-outline-none focus-visible:ve-ring-2 focus-visible:ve-ring-offset-2 disabled:ve-cursor-not-allowed disabled:ve-opacity-50",e),...t,children:ne.jsx(DP,{className:"ve-flex ve-items-center ve-justify-center",children:ne.jsx(IP,{className:"ve-h-2.5 ve-w-2.5 ve-fill-current ve-text-current"})})}));ng.displayName=Jw.displayName;var zP="Label",eN=de.forwardRef((e,t)=>ne.jsx(Mn.label,{...e,ref:t,onMouseDown:n=>{var o;n.target.closest("button, input, select, textarea")||((o=e.onMouseDown)==null||o.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));eN.displayName=zP;var tN=eN;const KP=Dr("ve-text-sm ve-font-medium ve-leading-none peer-disabled:ve-cursor-not-allowed peer-disabled:ve-opacity-70"),rg=de.forwardRef(({className:e,...t},n)=>ne.jsx(tN,{ref:n,className:gn(KP(),e),...t}));rg.displayName=tN.displayName;const gi=class gi{constructor(t=!1){fl(this,"enable",t=>{gi.enabled=t,gi.enabled&&console.log("[DEBUG] xYextDebug enabled")});fl(this,"logData",(t,n)=>{gi.enabled&&console.log("[DEBUG]",t,"-",n)});fl(this,"logFunc",t=>{gi.enabled&&console.log("[DEBUG] -->",t,"called")});fl(this,"log",t=>{gi.enabled&&console.log("[DEBUG]",t)});gi.enabled=t,gi.enabled&&console.log("[DEBUG] xYextDebug enabled")}};fl(gi,"enabled");let zr=gi;const GP={type:"custom",render:({onChange:e,value:t})=>ne.jsxs(ne.Fragment,{children:[ne.jsx(Zt.FieldLabel,{label:"Alternate Text",className:"ve-inline-block ve-pt-4",children:ne.jsx(Zt.AutoField,{field:{type:"text"},value:t.alternateText,onChange:n=>{e({...t,alternateText:n})}})}),ne.jsx(Zt.FieldLabel,{label:"Height",className:"ve-inline-block ve-pt-4",children:ne.jsx(Zt.AutoField,{field:{type:"number"},value:t.height,onChange:n=>{e({...t,height:n})}})}),ne.jsx(Zt.FieldLabel,{label:"Width",className:"ve-inline-block ve-pt-4",children:ne.jsx(Zt.AutoField,{field:{type:"number"},value:t.width,onChange:n=>{e({...t,width:n})}})}),ne.jsx(Zt.FieldLabel,{label:"URL",className:"ve-inline-block ve-pt-4",children:ne.jsx(Zt.AutoField,{field:{type:"text"},value:t.url,onChange:n=>{e({...t,url:n})}})})]})},og={type:"text"},UP={type:"custom",render:({onChange:e,value:t})=>ne.jsxs(ne.Fragment,{children:[ne.jsx(Zt.FieldLabel,{label:"Line 1",className:"ve-inline-block ve-pt-4",children:ne.jsx(Zt.AutoField,{field:{type:"text"},value:t.line1,onChange:n=>{e({...t,line1:n})}})}),ne.jsx(Zt.FieldLabel,{label:"Line 2",className:"ve-inline-block ve-pt-4",children:ne.jsx(Zt.AutoField,{field:{type:"text"},value:t.line2,onChange:n=>{e({...t,line2:n})}})}),ne.jsx(Zt.FieldLabel,{label:"Line 3",className:"ve-inline-block ve-pt-4",children:ne.jsx(Zt.AutoField,{field:{type:"text"},value:t.line3,onChange:n=>{e({...t,line3:n})}})}),ne.jsx(Zt.FieldLabel,{label:"City",className:"ve-inline-block ve-pt-4",children:ne.jsx(Zt.AutoField,{field:{type:"text"},value:t.city,onChange:n=>{e({...t,city:n})}})}),ne.jsx(Zt.FieldLabel,{label:"State/Region",className:"ve-inline-block ve-pt-4",children:ne.jsx(Zt.AutoField,{field:{type:"text"},value:t.region,onChange:n=>{e({...t,region:n})}})}),ne.jsx(Zt.FieldLabel,{label:"Sublocality",className:"ve-inline-block ve-pt-4",children:ne.jsx(Zt.AutoField,{field:{type:"text"},value:t.sublocality,onChange:n=>{e({...t,sublocality:n})}})}),ne.jsx(Zt.FieldLabel,{label:"Postal Code",className:"ve-inline-block ve-pt-4",children:ne.jsx(Zt.AutoField,{field:{type:"text"},value:t.postalCode,onChange:n=>{e({...t,postalCode:n})}})}),ne.jsx(Zt.FieldLabel,{label:"Country Code",className:"ve-inline-block ve-pt-4",children:ne.jsx(Zt.AutoField,{field:{type:"text"},value:t.countryCode,onChange:n=>{e({...t,countryCode:n})}})})]})},Rb="#969696",VP={type:"custom",render:({onChange:e,value:t})=>{const[n,r]=z.useState(t),o=(l,u)=>{const p=[...n];p[l]=u,r(p),e(p)},i=l=>{const u=n.filter((p,m)=>m!==l);r(u),e(u)},a=()=>{r([...n,""])};return ne.jsxs("div",{children:[n.map((l,u)=>ne.jsxs("div",{style:{display:"flex",alignItems:"center",marginBottom:"8px",gap:"4px"},children:[ne.jsx(Zt.AutoField,{field:{type:"text"},value:l,onChange:p=>o(u,p)}),ne.jsx("span",{style:{color:Rb},children:ne.jsx(Zt.IconButton,{onClick:()=>i(u),variant:"secondary",title:"Delete",disabled:n.length===1,children:ne.jsx(WP,{})})})]},u)),ne.jsx("span",{style:{color:Rb,width:"auto"},children:ne.jsx(Zt.Button,{onClick:a,variant:"secondary",icon:ne.jsx(jP,{}),fullWidth:!0,children:ne.jsx(ne.Fragment,{})})})]})}},ig=new zr,YP={"type.string":og,"type.phone":og,"type.image":GP,"type.address":UP},qP=(e,t)=>{if(t)return VP;const n=YP[e];return n||(ig.log(`No constant configuration for ${e}`),og)},ZP=(e,t)=>{let n;for(const r of e){const o=qP(r,t);if(!o){ig.log(`No mapped configuration for ${r}`);return}if(n||(n=o),n!==o){ig.log(`Could not resolve configuration for ${r}`);return}}return n},Ci=e=>{const t=ZP(e.filter.types,!!e.filter.includeListsOnly);return{type:"custom",label:e.label,render:({field:n,value:r,onChange:o})=>{const i=oP(e.filter),a=l=>{o({field:(r==null?void 0:r.field)??"",constantValue:(r==null?void 0:r.constantValue)??"",constantValueEnabled:l})};return ne.jsxs(ne.Fragment,{children:[!!t&&ne.jsx(JP,{constantValueEnabled:r==null?void 0:r.constantValueEnabled,toggleConstantValueEnabled:a}),r!=null&&r.constantValueEnabled?ne.jsx(Zt.FieldLabel,{label:"Constant Value",className:"entityField-constantValue",children:t&&ne.jsx(Zt.AutoField,{onChange:l=>o({field:(r==null?void 0:r.field)??"",constantValue:l,constantValueEnabled:!0}),value:r==null?void 0:r.constantValue,field:t})}):ne.jsx(Zt.FieldLabel,{label:n.label||"Label is undefined",className:"ve-mt-2.5",children:ne.jsx(Zt.AutoField,{field:{type:"select",options:[{value:"",label:"Select a Content field"},...i.map(l=>({label:l.name,value:l.name}))]},onChange:l=>{o({field:l,constantValue:(r==null?void 0:r.constantValue)??"",constantValueEnabled:!1})},value:r==null?void 0:r.field})})]})}}},JP=({constantValueEnabled:e,toggleConstantValueEnabled:t})=>ne.jsx("div",{className:"ve-mb-2 ve-w-full",children:ne.jsxs(Qw,{defaultValue:(e==null?void 0:e.toString())??"false",children:[ne.jsxs("div",{className:"ve-flex ve-items-center ve-space-x-2",children:[ne.jsx(ng,{value:"false",id:"ve-use-entity-value",onClick:()=>t(!1)}),ne.jsx(rg,{htmlFor:"ve-use-entity-value",children:"Use Entity Value"})]}),ne.jsxs("div",{className:"ve-flex ve-items-center ve-space-x-2",children:[ne.jsx(ng,{value:"true",id:"ve-use-constant-value",onClick:()=>t(!0)}),ne.jsx(rg,{htmlFor:"ve-use-constant-value",children:"Use Constant Value"})]})]})}),XP={address:Ci({label:"Address",filter:{types:["type.address"]}}),getDirectionsProvider:{label:"Maps Provider",type:"radio",options:[{label:"Google",value:"google"},{label:"Apple",value:"apple"},{label:"Bing",value:"bing"}]},alignment:{label:"Align card",type:"radio",options:[{label:"Left",value:"items-start"},{label:"Center",value:"items-center"}]},padding:{label:"Padding",type:"radio",options:[{label:"None",value:"none"},{label:"Small",value:"small"},{label:"Medium",value:"default"},{label:"Large",value:"large"}]}},QP=({alignment:e,padding:t,address:n,getDirectionsProvider:r})=>{const o=Uo(),i=xi(o,n),a=F1(i,void 0,void 0,{provider:r});return ne.jsx(Fu,{className:`flex flex-col justify-center components ${e} font-body-fontWeight text-body-fontSize text-body-color`,padding:t,children:i&&ne.jsx("div",{children:ne.jsxs(_o,{displayName:"Address",fieldId:n.constantValueEnabled?"constant value":"address",children:[ne.jsx(W1,{address:i,lines:[["line1"],["line2","city","region","postalCode"]]}),a&&ne.jsx(Yx,{cta:{link:a,label:"Get Directions",linkType:"URL"},target:"_blank",className:"font-bold text-palette-primary underline hover:no-underline md:px-4;"})]})})})},eI={fields:XP,defaultProps:{alignment:"items-start",padding:"none",getDirectionsProvider:"google",address:{field:"address",constantValue:{line1:"",city:"",region:"",postalCode:"",countryCode:""}}},label:"Address",render:e=>ne.jsx(QP,{...e})},nN=de.forwardRef(({text:e,...t},n)=>{const r=Uo();return ne.jsx(_o,{displayName:"Body",fieldId:e.constantValueEnabled?"constant value":e.field,children:ne.jsx(Tg,{ref:n,...t,children:xi(r,e)})})});nN.displayName="BodyText";const tI={text:Ci({label:"Entity Field",filter:{types:["type.string"]}}),fontWeight:{label:"Font Weight",type:"select",options:[{label:"Default",value:"default"},{label:"Thin",value:"thin"},{label:"Extra Light",value:"extralight"},{label:"Light",value:"light"},{label:"Normal",value:"normal"},{label:"Medium",value:"medium"},{label:"Semibold",value:"semibold"},{label:"Bold",value:"bold"},{label:"Extrabold",value:"extrabold"},{label:"Black",value:"black"}]},color:{label:"Color",type:"select",options:[{label:"Default",value:"default"},{label:"Primary",value:"primary"},{label:"Secondary",value:"secondary"},{label:"Accent",value:"accent"},{label:"Text",value:"text"},{label:"Background",value:"background"}]},textTransform:{label:"Text Transform",type:"select",options:[{label:"None",value:"none"},{label:"Uppercase",value:"uppercase"},{label:"Lowercase",value:"lowercase"},{label:"Capitalize",value:"capitalize"}]}},nI={label:"Body Text",fields:tI,defaultProps:{text:{field:"",constantValue:"Text",constantValueEnabled:!0},fontWeight:"default",color:"default",textTransform:"none"},render:e=>ne.jsx(nN,{...e})},rI={entityField:Ci({label:"Entity Field",filter:{types:["c_cta"]}}),variant:{type:"select",label:"Variant",options:[{label:"Primary",value:"primary"},{label:"Secondary",value:"secondary"},{label:"Outline",value:"outline"},{label:"Link",value:"link"}]}},oI=({entityField:e,variant:t,className:n,...r})=>{const o=Uo(),i=xi(o,e);return ne.jsx(_o,{displayName:"CTA",fieldId:e.constantValueEnabled?"constant value":e.field,children:ne.jsx(Ug,{label:i==null?void 0:i.name,url:(i==null?void 0:i.url)??"#",variant:t,className:gn(n),...r})})},iI={label:"Call to Action",fields:rI,defaultProps:{entityField:{field:"",constantValue:{label:"Call to Action",variant:"primary",size:"default"}},variant:"primary"},render:e=>ne.jsx(oI,{...e})},aI="data:image/svg+xml,%3csvg%20width='16'%20height='17'%20viewBox='0%200%2016%2017'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Material/Outline/Mail_outline'%3e%3cpath%20id='Vector'%20d='M14.4%201.95831H1.6C0.72%201.95831%200.00799999%202.67831%200.00799999%203.55831L0%2013.1583C0%2014.0383%200.72%2014.7583%201.6%2014.7583H14.4C15.28%2014.7583%2016%2014.0383%2016%2013.1583V3.55831C16%202.67831%2015.28%201.95831%2014.4%201.95831ZM14.4%2013.1583H1.6V5.15831L8%209.15831L14.4%205.15831V13.1583ZM8%207.55831L1.6%203.55831H14.4L8%207.55831Z'%20fill='%23D83B18'/%3e%3c/g%3e%3c/svg%3e",sI=Dr("list-inside p-8",{variants:{fontSize:{default:"text-body-fontSize",xs:"text-xs",sm:"text-sm",medium:"text-base",lg:"text-lg",xl:"text-xl","2xl":"text-2xl","3xl":"text-3xl","4xl":"text-4xl","5xl":"text-5xl"},fontWeight:{default:"font-body-fontWeight",thin:"font-thin",extralight:"font-extralight",light:"font-light",normal:"font-normal",medium:"font-medium",semibold:"font-semibold",bold:"font-bold",extrabold:"font-extrabold",black:"font-black"},color:{default:"text-body-color",primary:"text-palette-primary",secondary:"text-palette-secondary",accent:"text-palette-accent",text:"text-palette-text",background:"text-palette-background",foreground:"text-palette-foreground"}},defaultVariants:{fontSize:"default",fontWeight:"default",color:"default"}}),lI={list:Ci({label:"Entity Field",filter:{types:["type.string"],allowList:["emails"],includeListsOnly:!0}}),fontSize:{label:"Font Size",type:"select",options:[{label:"Default",value:"default"},{label:"Extra Small",value:"xs"},{label:"Small",value:"sm"},{label:"Medium",value:"medium"},{label:"Large",value:"lg"},{label:"Extra Large",value:"xl"},{label:"2xl",value:"2xl"},{label:"3xl",value:"3xl"},{label:"4xl",value:"4xl"},{label:"5xl",value:"5xl"}]},fontWeight:{label:"Font Weight",type:"select",options:[{label:"Default",value:"default"},{label:"Thin",value:"thin"},{label:"Extra Light",value:"extralight"},{label:"Light",value:"light"},{label:"Normal",value:"normal"},{label:"Medium",value:"medium"},{label:"Semibold",value:"semibold"},{label:"Bold",value:"bold"},{label:"Extrabold",value:"extrabold"},{label:"Black",value:"black"}]},color:{label:"Color",type:"select",options:[{label:"Default",value:"default"},{label:"Primary",value:"primary"},{label:"Secondary",value:"secondary"},{label:"Accent",value:"accent"},{label:"Text",value:"text"},{label:"Background",value:"background"}]},includeHyperlink:{label:"Include Hyperlink",type:"radio",options:[{label:"Yes",value:!0},{label:"No",value:!1}]},listLength:{type:"number",label:"List Length",min:1,max:100}},cI=({list:e,fontSize:t,fontWeight:n,color:r,includeHyperlink:o,listLength:i})=>{const a=Uo();let l=xi(a,e);return l?Array.isArray(l)||(l=[l]):l=["sample_email1@gmail.com","sample_email2@yahoo.com","sample_email3@msn.com"],ne.jsx(_o,{displayName:"Email List",fieldId:e.field,children:ne.jsx("ul",{className:gn("components",sI({fontSize:t,fontWeight:n,color:r}),`${o?"text-blue-600 dark:text-blue-500 hover:underline":""}`),children:l.slice(0,Math.min(l.length,i)).map((u,p)=>ne.jsxs("li",{className:"mb-2 flex items-center",children:[ne.jsx("img",{className:"m-2",src:aI}),ne.jsx("span",{children:o?ne.jsx("a",{href:u,children:u}):u})]},p))})})},uI={label:"Emails",fields:lI,defaultProps:{list:{field:"",constantValue:[]},includeHyperlink:!0,listLength:5},render:e=>ne.jsx(cI,{...e})},dI=Dr("flex",{variants:{direction:{row:"flex-row",column:"flex-col"},alignment:{start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch"},justification:{start:"justify-start",center:"justify-center",end:"justify-end",spaceBetween:"justify-between",spaceAround:"justify-around"},spacing:{small:"gap-2",medium:"gap-4",large:"gap-8"},wrap:{wrap:"flex-wrap",nowrap:"flex-nowrap"}},defaultVariants:{direction:"column",alignment:"start",justification:"start",spacing:"medium",wrap:"nowrap"}}),rN=de.forwardRef(({className:e,direction:t,alignment:n,justification:r,spacing:o,renderDropZone:i,...a},l)=>ne.jsx("div",{className:gn(dI({direction:t,alignment:n,justification:r,spacing:o,className:e})),ref:l,...a,children:i({zone:"flex-container"})}));rN.displayName="FlexContainer";const fI={direction:{label:"Direction",type:"select",options:[{value:"row",label:"Horizontal"},{value:"column",label:"Vertical"}]},alignment:{label:"Alignment",type:"select",options:[{value:"start",label:"Start"},{value:"center",label:"Center"},{value:"end",label:"End"},{value:"stretch",label:"Stretch"}]},justification:{label:"Justification",type:"select",options:[{value:"start",label:"Start"},{value:"center",label:"Center"},{value:"end",label:"End"},{value:"spaceBetween",label:"Space Between"},{value:"spaceAround",label:"Space Around"}]},spacing:{label:"Spacing",type:"select",options:[{value:"small",label:"Small"},{value:"medium",label:"Medium"},{value:"large",label:"Large"}]},wrap:{label:"Wrap",type:"select",options:[{value:"nowrap",label:"No Wrap"},{value:"wrap",label:"Wrap"}]}},hI={label:"Flex Container",fields:fI,defaultProps:{direction:"column",alignment:"start",justification:"start",spacing:"medium",wrap:"nowrap"},render:({direction:e,alignment:t,justification:n,spacing:r,puck:{renderDropZone:o}})=>ne.jsx(rN,{renderDropZone:o,direction:e,alignment:t,justification:n,spacing:r})},pI=Dr("components",{variants:{backgroundColor:{default:"bg-grid-backgroundColor",primary:"bg-palette-primary",secondary:"bg-palette-secondary",accent:"bg-palette-accent",text:"bg-palette-text",background:"bg-palette-background"},maxContentWidth:{default:"max-w-grid-maxWidth",lg:"max-w-[1024px]",xl:"max-w-[1280px]",xxl:"max-w-[1536px]"}},defaultVariants:{backgroundColor:"default",maxContentWidth:"default"}}),gI=Dr("components flex flex-col min-h-0 min-w-0 md:grid md:grid-cols-12 mx-auto gap-y-grid-verticalSpacing",{variants:{horizontalSpacing:{small:"gap-x-2 md:gap-x-4",medium:"gap-x-8 md:gap-x-12",large:"gap-x-12 md:gap-x-16"}},defaultVariants:{horizontalSpacing:"medium"}}),mI=Dr("flex flex-col",{variants:{verticalAlignment:{start:"justify-start",center:"justify-center",end:"justify-end",spaceBetween:"justify-between"},verticalSpacing:{default:"gap-y-grid-verticalSpacing",small:"gap-y-2",medium:"gap-y-4",large:"gap-y-8"},padding:{none:"",small:"p-2",medium:"p-4",large:"p-8"}},defaultVariants:{verticalAlignment:"start",verticalSpacing:"default",padding:"none"}}),oN=z.forwardRef(({className:e,distribution:t,columns:n,horizontalSpacing:r,maxContentWidth:o,renderDropZone:i,backgroundColor:a,...l},u)=>ne.jsx(Fu,{className:pI({maxContentWidth:o,backgroundColor:a}),children:ne.jsx("div",{className:gn(gI({horizontalSpacing:r,className:e})),ref:u,style:{gridTemplateColumns:t==="manual"?"repeat(12, 1fr)":`repeat(${n.length}, 1fr)`},...l,children:n.map(({span:p,verticalAlignment:m,verticalSpacing:_,padding:v},C)=>ne.jsx("div",{className:gn(mI({verticalAlignment:m,verticalSpacing:_,padding:v})),style:{gridColumn:p&&t==="manual"?`span ${Math.max(Math.min(p,12),1)}`:""},children:i({zone:`column-${C}`})},C))})}));oN.displayName="GridSection";const vI={distribution:{type:"radio",options:[{value:"auto",label:"Auto"},{value:"manual",label:"Manual"}]},columns:{type:"array",getItemSummary:(e,t)=>`Column ${(t??0)+1}, span ${e.span?Math.max(Math.min(e.span,12),1):"auto"}`,arrayFields:{span:{label:"Span (1-12)",type:"number",min:0,max:12},verticalAlignment:{label:"Vertical Alignment",type:"select",options:[{value:"start",label:"Start"},{value:"center",label:"Center"},{value:"end",label:"End"},{value:"spaceBetween",label:"Space Between"}]},verticalSpacing:{label:"Vertical Spacing",type:"select",options:[{value:"default",label:"Default"},{value:"small",label:"Small"},{value:"medium",label:"Medium"},{value:"large",label:"Large"}]},padding:{label:"Padding",type:"select",options:[{value:"none",label:"None"},{value:"small",label:"Small"},{value:"medium",label:"Medium"},{value:"large",label:"Large"}]}}},horizontalSpacing:{label:"Horizontal Spacing",type:"select",options:[{value:"small",label:"Small"},{value:"medium",label:"Medium"},{value:"large",label:"Large"}]},maxContentWidth:{label:"Maximum Content Width",type:"select",options:[{value:"default",label:"Default"},{value:"lg",label:"LG"},{value:"xl",label:"XL"},{value:"xxl",label:"2XL"}]},backgroundColor:{label:"Background Color",type:"select",options:[{label:"Default",value:"default"},{label:"Primary",value:"primary"},{label:"Secondary",value:"secondary"},{label:"Accent",value:"accent"},{label:"Text",value:"text"},{label:"Background",value:"background"}]}},yI={label:"Grid Section",fields:vI,defaultProps:{distribution:"auto",columns:[{verticalAlignment:"start",verticalSpacing:"default",padding:"none"},{verticalAlignment:"start",verticalSpacing:"default",padding:"none"}],backgroundColor:"default",horizontalSpacing:"medium",maxContentWidth:"default"},render:({columns:e,distribution:t,backgroundColor:n,maxContentWidth:r,horizontalSpacing:o,puck:{renderDropZone:i}})=>ne.jsx(oN,{renderDropZone:i,columns:e,distribution:t,backgroundColor:n,maxContentWidth:r,horizontalSpacing:o})},iN=z.forwardRef(({text:e,...t},n)=>{const r=Uo();return ne.jsx(_o,{displayName:"Heading "+t.level,fieldId:e.constantValueEnabled?"constant value":e.field,children:ne.jsx(Vg,{ref:n,...t,children:xi(r,e)})})});iN.displayName="HeadingText";const bI={text:Ci({label:"Entity Field",filter:{types:["type.string"]}}),level:{type:"number",label:"Heading Level",min:1,max:6},weight:{label:"Font Weight",type:"select",options:[{label:"Default",value:"default"},{label:"Thin",value:"thin"},{label:"Extra Light",value:"extralight"},{label:"Light",value:"light"},{label:"Normal",value:"normal"},{label:"Medium",value:"medium"},{label:"Semibold",value:"semibold"},{label:"Bold",value:"bold"},{label:"Extrabold",value:"extrabold"},{label:"Black",value:"black"}]},color:{label:"Font Color",type:"select",options:[{label:"Default",value:"default"},{label:"Primary",value:"primary"},{label:"Secondary",value:"secondary"},{label:"Accent",value:"accent"},{label:"Text",value:"text"},{label:"Background",value:"background"},{label:"Foreground",value:"foreground"}]},transform:{label:"Text Transform",type:"select",options:[{value:"none",label:"None"},{value:"lowercase",label:"Lowercase"},{value:"uppercase",label:"Uppercase"},{value:"capitalize",label:"Capitalize"}]}},_I={label:"Heading Text",fields:bI,defaultProps:{text:{field:"",constantValue:"Text",constantValueEnabled:!0},content:"Heading",level:2,weight:"default",color:"default",transform:"none"},render:e=>ne.jsx(iN,{...e})},xI={startOfWeek:{label:"Start of the week",type:"radio",options:[{label:"Monday",value:"monday"},{label:"Tuesday",value:"tuesday"},{label:"Wednesday",value:"wednesday"},{label:"Thursday",value:"thursday"},{label:"Friday",value:"friday"},{label:"Saturday",value:"saturday"},{label:"Sunday",value:"sunday"},{label:"Today",value:"today"}]},collapseDays:{label:"Collapse days",type:"radio",options:[{label:"Yes",value:!0},{label:"No",value:!1}]},showAdditionalHoursText:{label:"Show additional hours text",type:"radio",options:[{label:"Yes",value:!0},{label:"No",value:!1}]},alignment:{label:"Align card",type:"radio",options:[{label:"Left",value:"items-start"},{label:"Center",value:"items-center"}]},padding:{label:"Padding",type:"radio",options:[{label:"None",value:"none"},{label:"Small",value:"small"},{label:"Medium",value:"default"},{label:"Large",value:"large"}]}},EI=({startOfWeek:e,collapseDays:t,showAdditionalHoursText:n,alignment:r,padding:o})=>{const{hours:i,additionalHoursText:a}=Uo();return ne.jsx(Fu,{className:`flex flex-col justify-center components ${r} font-body-fontWeight text-body-fontSize text-body-color`,padding:o,children:ne.jsxs("div",{children:[i&&ne.jsx(_o,{displayName:"Hours",fieldId:"hours",children:ne.jsx(X$,{hours:i,startOfWeek:e,collapseDays:t})}),a&&n&&ne.jsx(_o,{displayName:"Hours Text",fieldId:"additionalHoursText",children:ne.jsx("div",{className:"mt-4",children:a})})]})})},CI={fields:xI,defaultProps:{startOfWeek:"today",collapseDays:!1,showAdditionalHoursText:!0,alignment:"items-center",padding:"none"},label:"Hours Card",render:e=>ne.jsx(EI,{...e})},wI={hours:Ci({label:"Hours",filter:{types:["type.hours"]}}),showCurrentStatus:{type:"radio",label:"Show Current Status",options:[{label:"Yes",value:!0},{label:"No",value:!1}]},timeFormat:{type:"select",label:"Time Format",options:[{label:"12-hour",value:"12h"},{label:"24-hour",value:"24h"}]},showDayNames:{type:"radio",label:"Show Day Names",options:[{label:"Yes",value:!0},{label:"No",value:!1}]},dayOfWeekFormat:{type:"select",label:"Day of Week Format",options:[{label:"Short",value:"short"},{label:"Long",value:"long"}]}},NI=({hours:e,className:t,showCurrentStatus:n,timeFormat:r,showDayNames:o,dayOfWeekFormat:i})=>{const a=Uo(),l=xi(a,e);return l?ne.jsx(_o,{displayName:"Hours",fieldId:e.field,children:ne.jsx(Y$,{hours:l,className:gn("font-semibold mb-2",t),currentTemplate:n?void 0:()=>ne.jsx(ne.Fragment,{}),separatorTemplate:n?void 0:()=>ne.jsx(ne.Fragment,{}),dayOfWeekTemplate:o?void 0:()=>ne.jsx(ne.Fragment,{}),dayOptions:{weekday:i},timeOptions:{hour12:r==="12h"},timezone:Intl.DateTimeFormat().resolvedOptions().timeZone})}):null},TI={label:"Hours Status",fields:wI,defaultProps:{hours:{field:"hours",constantValue:""},className:"",showCurrentStatus:!0,timeFormat:"12h",showDayNames:!0,dayOfWeekFormat:"long"},render:e=>ne.jsx(NI,{...e})},SI="https://placehold.co/640x360",OI=Dr("",{variants:{size:{small:"max-w-xs",medium:"max-w-md",large:"max-w-xl",full:"w-full"},aspectRatio:{auto:"aspect-auto",square:"aspect-square",video:"aspect-video",portrait:"aspect-[3/4]"},rounded:{none:"",small:"rounded-sm",medium:"rounded-md",large:"rounded-lg",full:"rounded-full"}},defaultVariants:{size:"medium",aspectRatio:"auto",rounded:null}}),AI={image:Ci({label:"Image",filter:{types:["type.image"]}}),size:{type:"select",label:"Size",options:[{label:"Small",value:"small"},{label:"Medium",value:"medium"},{label:"Large",value:"large"},{label:"Full Width",value:"full"}]},aspectRatio:{type:"select",label:"Aspect Ratio",options:[{label:"Auto",value:"auto"},{label:"Square",value:"square"},{label:"Video (16:9)",value:"video"},{label:"Portrait (3:4)",value:"portrait"}]},rounded:{type:"select",label:"Rounded Corners",options:[{label:"None",value:"none"},{label:"Small",value:"small"},{label:"Medium",value:"medium"},{label:"Large",value:"large"},{label:"Full",value:"full"}]}},RI=({image:e,size:t,aspectRatio:n,rounded:r})=>{const o=Uo(),i=xi(o,e);return i?ne.jsx(_o,{displayName:"Image",fieldId:e.field,children:ne.jsx("div",{className:gn(OI({size:t,aspectRatio:n,rounded:r}),"overflow-hidden"),children:ne.jsx(sO,{image:i,className:"w-full h-full object-cover"})})}):null},$I={label:"Image",fields:AI,defaultProps:{image:{field:"primaryPhoto",constantValue:{alternateText:"",height:360,width:640,url:SI},constantValueEnabled:!0},size:"medium",aspectRatio:"auto",rounded:"none"},render:e=>ne.jsx(RI,{...e})},DI=Dr("components",{variants:{fontWeight:{default:"font-body-fontWeight",thin:"font-thin",extralight:"font-extralight",light:"font-light",normal:"font-normal",medium:"font-medium",semibold:"font-semibold",bold:"font-bold",extrabold:"font-extrabold",black:"font-black"},color:{default:"text-body-color",primary:"text-palette-primary",secondary:"text-palette-secondary",accent:"text-palette-accent",text:"text-palette-text",background:"text-palette-background",foreground:"text-palette-foreground"}},defaultVariants:{fontWeight:"default",color:"default"}}),MI=e=>{const n=(""+e).replace(/\D/g,"").match(/^(1|)?(\d{3})(\d{3})(\d{4})$/);return n?[n[1]?"+1 ":"","(",n[2],") ",n[3],"-",n[4]].join(""):e},kI={phone:Ci({label:"Entity Field",filter:{types:["type.phone"]}}),textSize:{label:"Text Size",type:"number",min:1},fontWeight:{label:"Font Weight",type:"select",options:[{label:"Default",value:"default"},{label:"Thin",value:"thin"},{label:"Extra Light",value:"extralight"},{label:"Light",value:"light"},{label:"Normal",value:"normal"},{label:"Medium",value:"medium"},{label:"Semibold",value:"semibold"},{label:"Bold",value:"bold"},{label:"Extrabold",value:"extrabold"},{label:"Black",value:"black"}]},color:{label:"Color",type:"select",options:[{label:"Default",value:"default"},{label:"Primary",value:"primary"},{label:"Secondary",value:"secondary"},{label:"Accent",value:"accent"},{label:"Text",value:"text"},{label:"Background",value:"background"}]}},PI=({phone:e,textSize:t,fontWeight:n,color:r})=>{const o=Uo(),i=xi(o,e),a={fontSize:t?t+"px":void 0};return ne.jsx(_o,{displayName:"Phone",fieldId:e.field,children:ne.jsx("p",{className:gn(DI({fontWeight:n,color:r})),style:a??"",children:MI(i)})})},II={label:"Phone",fields:kI,defaultProps:{textSize:16,phone:{field:"mainPhone",constantValue:""}},render:e=>ne.jsx(PI,{...e})},LI=Dr("list-inside text-body-FontSize p-8",{variants:{fontWeight:{default:"font-body-fontWeight",thin:"font-thin",extralight:"font-extralight",light:"font-light",normal:"font-normal",medium:"font-medium",semibold:"font-semibold",bold:"font-bold",extrabold:"font-extrabold",black:"font-black"},color:{default:"text-palette-body-color",primary:"text-palette-primary",secondary:"text-palette-secondary",accent:"text-palette-accent",text:"text-palette-text",background:"text-palette-background"},textTransform:{none:"",uppercase:"uppercase",lowercase:"lowercase",capitalize:"capitalize"},padding:{default:"px-4 py-16 md:px-8",none:"p-0",small:"px-4 py-8 md:px-8",large:"px-[200px] py-24 md:px-8"}},defaultVariants:{padding:"none",fontWeight:"default",color:"default",textTransform:"none"}}),FI={list:Ci({label:"Entity Field",filter:{types:["type.string"],includeListsOnly:!0}}),fontWeight:{label:"Font Weight",type:"select",options:[{label:"Default",value:"default"},{label:"Thin",value:"thin"},{label:"Extra Light",value:"extralight"},{label:"Light",value:"light"},{label:"Normal",value:"normal"},{label:"Medium",value:"medium"},{label:"Semibold",value:"semibold"},{label:"Bold",value:"bold"},{label:"Extrabold",value:"extrabold"},{label:"Black",value:"black"}]},padding:{label:"Padding",type:"radio",options:[{label:"None",value:"none"},{label:"Small",value:"small"},{label:"Medium",value:"default"},{label:"Large",value:"large"}]},color:{label:"Color",type:"select",options:[{label:"Default",value:"default"},{label:"Primary",value:"primary"},{label:"Secondary",value:"secondary"},{label:"Accent",value:"accent"},{label:"Text",value:"text"},{label:"Background",value:"background"}]},textTransform:{label:"Text Transform",type:"select",options:[{label:"None",value:"none"},{label:"Uppercase",value:"uppercase"},{label:"Lowercase",value:"lowercase"},{label:"Capitalize",value:"capitalize"}]}},jI=({list:e,padding:t,fontWeight:n,color:r,textTransform:o})=>{const i=Uo();let a=xi(i,e);return a?Array.isArray(a)||(a=[a]):a=["Sample text 1","Sample text 2","Sample text 3"],ne.jsx(_o,{displayName:"Text List",fieldId:e.field,children:ne.jsx("ul",{className:$u(LI({padding:t,fontWeight:n,color:r,textTransform:o}),"list-disc components"),children:a.map((l,u)=>ne.jsx("li",{className:"mb-2",children:l},u))})})},BI={label:"Text List",fields:FI,defaultProps:{padding:"none",list:{field:"",constantValue:[]}},render:e=>ne.jsx(jI,{...e})};var dm="Progress",fm=100,[HI,hJ]=za(dm),[WI,zI]=HI(dm),aN=de.forwardRef((e,t)=>{const{__scopeProgress:n,value:r=null,max:o,getValueLabel:i=KI,...a}=e;(o||o===0)&&!$b(o)&&console.error(GI(`${o}`,"Progress"));const l=$b(o)?o:fm;r!==null&&!Db(r,l)&&console.error(UI(`${r}`,"Progress"));const u=Db(r,l)?r:null,p=gf(u)?i(u,l):void 0;return ne.jsx(WI,{scope:n,value:u,max:l,children:ne.jsx(Mn.div,{"aria-valuemax":l,"aria-valuemin":0,"aria-valuenow":gf(u)?u:void 0,"aria-valuetext":p,role:"progressbar","data-state":cN(u,l),"data-value":u??void 0,"data-max":l,...a,ref:t})})});aN.displayName=dm;var sN="ProgressIndicator",lN=de.forwardRef((e,t)=>{const{__scopeProgress:n,...r}=e,o=zI(sN,n);return ne.jsx(Mn.div,{"data-state":cN(o.value,o.max),"data-value":o.value??void 0,"data-max":o.max,...r,ref:t})});lN.displayName=sN;function KI(e,t){return`${Math.round(e/t*100)}%`}function cN(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function gf(e){return typeof e=="number"}function $b(e){return gf(e)&&!isNaN(e)&&e>0}function Db(e,t){return gf(e)&&!isNaN(e)&&e<=t&&e>=0}function GI(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${fm}\`.`}function UI(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
|
|
180
|
-
- a positive number
|
|
181
|
-
- less than the value passed to \`max\` (or ${fm} if no \`max\` prop is set)
|
|
182
|
-
- \`null\` or \`undefined\` if the progress is indeterminate.
|
|
183
|
-
|
|
184
|
-
Defaulting to \`null\`.`}var uN=aN,VI=lN;const dN=de.forwardRef(({className:e,value:t,...n},r)=>ne.jsx(uN,{ref:r,className:gn("ve-relative ve-h-4 ve-w-full ve-overflow-hidden ve-rounded-full ve-bg-secondary",e),...n,children:ne.jsx(VI,{className:"ve-h-full ve-w-full ve-flex-1 ve-bg-primary ve-transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));dN.displayName=uN.displayName;function hm({progress:e}){return ne.jsxs("div",{className:"ve-flex ve-h-screen ve-loading-wrapper ve-w-screen ve-flex-col ve-items-center ve-justify-center",children:[ne.jsx(dN,{className:"ve-w-1/3 ve-loading-progress",value:e}),ne.jsx("div",{children:"Loading Visual Editor..."})]})}var Mb=["light","dark"],YI="(prefers-color-scheme: dark)",qI=de.createContext(void 0),ZI={setTheme:e=>{},themes:[]},JI=()=>{var e;return(e=de.useContext(qI))!=null?e:ZI};de.memo(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:r,enableColorScheme:o,defaultTheme:i,value:a,attrs:l,nonce:u})=>{let p=i==="system",m=n==="class"?`var d=document.documentElement,c=d.classList;${`c.remove(${l.map(b=>`'${b}'`).join(",")})`};`:`var d=document.documentElement,n='${n}',s='setAttribute';`,_=o?Mb.includes(i)&&i?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${i}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",v=(b,y=!1,N=!0)=>{let R=a?a[b]:b,O=y?b+"|| ''":`'${R}'`,k="";return o&&N&&!y&&Mb.includes(b)&&(k+=`d.style.colorScheme = '${b}';`),n==="class"?y||R?k+=`c.add(${O})`:k+="null":R&&(k+=`d[s](n,${O})`),k},C=e?`!function(){${m}${v(e)}}()`:r?`!function(){try{${m}var e=localStorage.getItem('${t}');if('system'===e||(!e&&${p})){var t='${YI}',m=window.matchMedia(t);if(m.media!==t||m.matches){${v("dark")}}else{${v("light")}}}else if(e){${a?`var x=${JSON.stringify(a)};`:""}${v(a?"x[e]":"e",!0)}}${p?"":"else{"+v(i,!1,!1)+"}"}${_}}catch(e){}}()`:`!function(){try{${m}var e=localStorage.getItem('${t}');if(e){${a?`var x=${JSON.stringify(a)};`:""}${v(a?"x[e]":"e",!0)}}else{${v(i,!1,!1)};}${_}}catch(t){}}();`;return de.createElement("script",{nonce:u,dangerouslySetInnerHTML:{__html:C}})});var XI=e=>{switch(e){case"success":return tL;case"info":return rL;case"warning":return nL;case"error":return oL;default:return null}},QI=Array(12).fill(0),eL=({visible:e})=>z.createElement("div",{className:"sonner-loading-wrapper","data-visible":e},z.createElement("div",{className:"sonner-spinner"},QI.map((t,n)=>z.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${n}`})))),tL=z.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},z.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),nL=z.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},z.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),rL=z.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},z.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),oL=z.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},z.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),iL=()=>{let[e,t]=z.useState(document.hidden);return z.useEffect(()=>{let n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e},ag=1,aL=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let{message:n,...r}=e,o=typeof(e==null?void 0:e.id)=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:ag++,i=this.toasts.find(l=>l.id===o),a=e.dismissible===void 0?!0:e.dismissible;return i?this.toasts=this.toasts.map(l=>l.id===o?(this.publish({...l,...e,id:o,title:n}),{...l,...e,id:o,dismissible:a,title:n}):l):this.addToast({title:n,...r,dismissible:a,id:o}),o},this.dismiss=e=>(e||this.toasts.forEach(t=>{this.subscribers.forEach(n=>n({id:t.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));let r=e instanceof Promise?e:e(),o=n!==void 0;return r.then(async i=>{if(lL(i)&&!i.ok){o=!1;let a=typeof t.error=="function"?await t.error(`HTTP error! status: ${i.status}`):t.error,l=typeof t.description=="function"?await t.description(`HTTP error! status: ${i.status}`):t.description;this.create({id:n,type:"error",message:a,description:l})}else if(t.success!==void 0){o=!1;let a=typeof t.success=="function"?await t.success(i):t.success,l=typeof t.description=="function"?await t.description(i):t.description;this.create({id:n,type:"success",message:a,description:l})}}).catch(async i=>{if(t.error!==void 0){o=!1;let a=typeof t.error=="function"?await t.error(i):t.error,l=typeof t.description=="function"?await t.description(i):t.description;this.create({id:n,type:"error",message:a,description:l})}}).finally(()=>{var i;o&&(this.dismiss(n),n=void 0),(i=t.finally)==null||i.call(t)}),n},this.custom=(e,t)=>{let n=(t==null?void 0:t.id)||ag++;return this.create({jsx:e(n),id:n,...t}),n},this.subscribers=[],this.toasts=[]}},no=new aL,sL=(e,t)=>{let n=(t==null?void 0:t.id)||ag++;return no.addToast({title:e,...t,id:n}),n},lL=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",cL=sL,uL=()=>no.toasts;Object.assign(cL,{success:no.success,info:no.info,warning:no.warning,error:no.error,custom:no.custom,message:no.message,promise:no.promise,dismiss:no.dismiss,loading:no.loading},{getHistory:uL});function dL(e,{insertAt:t}={}){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t==="top"&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}dL(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999}:where([data-sonner-toaster][data-x-position="right"]){right:max(var(--offset),env(safe-area-inset-right))}:where([data-sonner-toaster][data-x-position="left"]){left:max(var(--offset),env(safe-area-inset-left))}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:max(var(--offset),env(safe-area-inset-top))}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:max(var(--offset),env(safe-area-inset-bottom))}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;background:var(--gray1);color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:0;right:0;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount, 0px));transition:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation:swipe-out .2s ease-out forwards}@keyframes swipe-out{0%{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount)));opacity:1}to{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount) + var(--lift) * -100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;--mobile-offset: 16px;right:var(--mobile-offset);left:var(--mobile-offset);width:100%}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset)}[data-sonner-toaster][data-y-position=bottom]{bottom:20px}[data-sonner-toaster][data-y-position=top]{top:20px}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset);right:var(--mobile-offset);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}
|
|
185
|
-
`);function Hd(e){return e.label!==void 0}var fL=3,hL="32px",pL=4e3,gL=356,mL=14,vL=20,yL=200;function bL(...e){return e.filter(Boolean).join(" ")}var _L=e=>{var t,n,r,o,i,a,l,u,p,m;let{invert:_,toast:v,unstyled:C,interacting:b,setHeights:y,visibleToasts:N,heights:R,index:O,toasts:k,expanded:I,removeToast:M,defaultRichColors:Y,closeButton:ee,style:re,cancelButtonStyle:Z,actionButtonStyle:U,className:J="",descriptionClassName:fe="",duration:ge,position:te,gap:he,loadingIcon:V,expandByDefault:B,classNames:q,icons:ie,closeButtonAriaLabel:H="Close toast",pauseWhenPageIsHidden:j,cn:Q}=e,[F,w]=z.useState(!1),[T,P]=z.useState(!1),[X,ue]=z.useState(!1),[pe,se]=z.useState(!1),[Ce,Se]=z.useState(0),[He,le]=z.useState(0),ce=z.useRef(null),ve=z.useRef(null),ke=O===0,Pe=O+1<=N,Fe=v.type,Qe=v.dismissible!==!1,st=v.className||"",dt=v.descriptionClassName||"",At=z.useMemo(()=>R.findIndex(et=>et.toastId===v.id)||0,[R,v.id]),Ae=z.useMemo(()=>{var et;return(et=v.closeButton)!=null?et:ee},[v.closeButton,ee]),me=z.useMemo(()=>v.duration||ge||pL,[v.duration,ge]),_e=z.useRef(0),De=z.useRef(0),je=z.useRef(0),Me=z.useRef(null),[We,tt]=te.split("-"),ht=z.useMemo(()=>R.reduce((et,ot,ct)=>ct>=At?et:et+ot.height,0),[R,At]),Et=iL(),Lt=v.invert||_,Xe=Fe==="loading";De.current=z.useMemo(()=>At*he+ht,[At,ht]),z.useEffect(()=>{w(!0)},[]),z.useLayoutEffect(()=>{if(!F)return;let et=ve.current,ot=et.style.height;et.style.height="auto";let ct=et.getBoundingClientRect().height;et.style.height=ot,le(ct),y(pt=>pt.find(Ct=>Ct.toastId===v.id)?pt.map(Ct=>Ct.toastId===v.id?{...Ct,height:ct}:Ct):[{toastId:v.id,height:ct,position:v.position},...pt])},[F,v.title,v.description,y,v.id]);let qe=z.useCallback(()=>{P(!0),Se(De.current),y(et=>et.filter(ot=>ot.toastId!==v.id)),setTimeout(()=>{M(v)},yL)},[v,M,y,De]);z.useEffect(()=>{if(v.promise&&Fe==="loading"||v.duration===1/0||v.type==="loading")return;let et,ot=me;return I||b||j&&Et?(()=>{if(je.current<_e.current){let ct=new Date().getTime()-_e.current;ot=ot-ct}je.current=new Date().getTime()})():ot!==1/0&&(_e.current=new Date().getTime(),et=setTimeout(()=>{var ct;(ct=v.onAutoClose)==null||ct.call(v,v),qe()},ot)),()=>clearTimeout(et)},[I,b,B,v,me,qe,v.promise,Fe,j,Et]),z.useEffect(()=>{let et=ve.current;if(et){let ot=et.getBoundingClientRect().height;return le(ot),y(ct=>[{toastId:v.id,height:ot,position:v.position},...ct]),()=>y(ct=>ct.filter(pt=>pt.toastId!==v.id))}},[y,v.id]),z.useEffect(()=>{v.delete&&qe()},[qe,v.delete]);function lt(){return ie!=null&&ie.loading?z.createElement("div",{className:"sonner-loader","data-visible":Fe==="loading"},ie.loading):V?z.createElement("div",{className:"sonner-loader","data-visible":Fe==="loading"},V):z.createElement(eL,{visible:Fe==="loading"})}return z.createElement("li",{"aria-live":v.important?"assertive":"polite","aria-atomic":"true",role:"status",tabIndex:0,ref:ve,className:Q(J,st,q==null?void 0:q.toast,(t=v==null?void 0:v.classNames)==null?void 0:t.toast,q==null?void 0:q.default,q==null?void 0:q[Fe],(n=v==null?void 0:v.classNames)==null?void 0:n[Fe]),"data-sonner-toast":"","data-rich-colors":(r=v.richColors)!=null?r:Y,"data-styled":!(v.jsx||v.unstyled||C),"data-mounted":F,"data-promise":!!v.promise,"data-removed":T,"data-visible":Pe,"data-y-position":We,"data-x-position":tt,"data-index":O,"data-front":ke,"data-swiping":X,"data-dismissible":Qe,"data-type":Fe,"data-invert":Lt,"data-swipe-out":pe,"data-expanded":!!(I||B&&F),style:{"--index":O,"--toasts-before":O,"--z-index":k.length-O,"--offset":`${T?Ce:De.current}px`,"--initial-height":B?"auto":`${He}px`,...re,...v.style},onPointerDown:et=>{Xe||!Qe||(ce.current=new Date,Se(De.current),et.target.setPointerCapture(et.pointerId),et.target.tagName!=="BUTTON"&&(ue(!0),Me.current={x:et.clientX,y:et.clientY}))},onPointerUp:()=>{var et,ot,ct,pt;if(pe||!Qe)return;Me.current=null;let Ct=Number(((et=ve.current)==null?void 0:et.style.getPropertyValue("--swipe-amount").replace("px",""))||0),$t=new Date().getTime()-((ot=ce.current)==null?void 0:ot.getTime()),Yt=Math.abs(Ct)/$t;if(Math.abs(Ct)>=vL||Yt>.11){Se(De.current),(ct=v.onDismiss)==null||ct.call(v,v),qe(),se(!0);return}(pt=ve.current)==null||pt.style.setProperty("--swipe-amount","0px"),ue(!1)},onPointerMove:et=>{var ot;if(!Me.current||!Qe)return;let ct=et.clientY-Me.current.y,pt=et.clientX-Me.current.x,Ct=(We==="top"?Math.min:Math.max)(0,ct),$t=et.pointerType==="touch"?10:2;Math.abs(Ct)>$t?(ot=ve.current)==null||ot.style.setProperty("--swipe-amount",`${ct}px`):Math.abs(pt)>$t&&(Me.current=null)}},Ae&&!v.jsx?z.createElement("button",{"aria-label":H,"data-disabled":Xe,"data-close-button":!0,onClick:Xe||!Qe?()=>{}:()=>{var et;qe(),(et=v.onDismiss)==null||et.call(v,v)},className:Q(q==null?void 0:q.closeButton,(o=v==null?void 0:v.classNames)==null?void 0:o.closeButton)},z.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},z.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),z.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"}))):null,v.jsx||z.isValidElement(v.title)?v.jsx||v.title:z.createElement(z.Fragment,null,Fe||v.icon||v.promise?z.createElement("div",{"data-icon":"",className:Q(q==null?void 0:q.icon,(i=v==null?void 0:v.classNames)==null?void 0:i.icon)},v.promise||v.type==="loading"&&!v.icon?v.icon||lt():null,v.type!=="loading"?v.icon||(ie==null?void 0:ie[Fe])||XI(Fe):null):null,z.createElement("div",{"data-content":"",className:Q(q==null?void 0:q.content,(a=v==null?void 0:v.classNames)==null?void 0:a.content)},z.createElement("div",{"data-title":"",className:Q(q==null?void 0:q.title,(l=v==null?void 0:v.classNames)==null?void 0:l.title)},v.title),v.description?z.createElement("div",{"data-description":"",className:Q(fe,dt,q==null?void 0:q.description,(u=v==null?void 0:v.classNames)==null?void 0:u.description)},v.description):null),z.isValidElement(v.cancel)?v.cancel:v.cancel&&Hd(v.cancel)?z.createElement("button",{"data-button":!0,"data-cancel":!0,style:v.cancelButtonStyle||Z,onClick:et=>{var ot,ct;Hd(v.cancel)&&Qe&&((ct=(ot=v.cancel).onClick)==null||ct.call(ot,et),qe())},className:Q(q==null?void 0:q.cancelButton,(p=v==null?void 0:v.classNames)==null?void 0:p.cancelButton)},v.cancel.label):null,z.isValidElement(v.action)?v.action:v.action&&Hd(v.action)?z.createElement("button",{"data-button":!0,"data-action":!0,style:v.actionButtonStyle||U,onClick:et=>{var ot,ct;Hd(v.action)&&(et.defaultPrevented||((ct=(ot=v.action).onClick)==null||ct.call(ot,et),qe()))},className:Q(q==null?void 0:q.actionButton,(m=v==null?void 0:v.classNames)==null?void 0:m.actionButton)},v.action.label):null))};function kb(){if(typeof window>"u"||typeof document>"u")return"ltr";let e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}var xL=e=>{let{invert:t,position:n="bottom-right",hotkey:r=["altKey","KeyT"],expand:o,closeButton:i,className:a,offset:l,theme:u="light",richColors:p,duration:m,style:_,visibleToasts:v=fL,toastOptions:C,dir:b=kb(),gap:y=mL,loadingIcon:N,icons:R,containerAriaLabel:O="Notifications",pauseWhenPageIsHidden:k,cn:I=bL}=e,[M,Y]=z.useState([]),ee=z.useMemo(()=>Array.from(new Set([n].concat(M.filter(j=>j.position).map(j=>j.position)))),[M,n]),[re,Z]=z.useState([]),[U,J]=z.useState(!1),[fe,ge]=z.useState(!1),[te,he]=z.useState(u!=="system"?u:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),V=z.useRef(null),B=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),q=z.useRef(null),ie=z.useRef(!1),H=z.useCallback(j=>{var Q;(Q=M.find(F=>F.id===j.id))!=null&&Q.delete||no.dismiss(j.id),Y(F=>F.filter(({id:w})=>w!==j.id))},[M]);return z.useEffect(()=>no.subscribe(j=>{if(j.dismiss){Y(Q=>Q.map(F=>F.id===j.id?{...F,delete:!0}:F));return}setTimeout(()=>{Ru.flushSync(()=>{Y(Q=>{let F=Q.findIndex(w=>w.id===j.id);return F!==-1?[...Q.slice(0,F),{...Q[F],...j},...Q.slice(F+1)]:[j,...Q]})})})}),[]),z.useEffect(()=>{if(u!=="system"){he(u);return}u==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?he("dark"):he("light")),typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",({matches:j})=>{he(j?"dark":"light")})},[u]),z.useEffect(()=>{M.length<=1&&J(!1)},[M]),z.useEffect(()=>{let j=Q=>{var F,w;r.every(T=>Q[T]||Q.code===T)&&(J(!0),(F=V.current)==null||F.focus()),Q.code==="Escape"&&(document.activeElement===V.current||(w=V.current)!=null&&w.contains(document.activeElement))&&J(!1)};return document.addEventListener("keydown",j),()=>document.removeEventListener("keydown",j)},[r]),z.useEffect(()=>{if(V.current)return()=>{q.current&&(q.current.focus({preventScroll:!0}),q.current=null,ie.current=!1)}},[V.current]),M.length?z.createElement("section",{"aria-label":`${O} ${B}`,tabIndex:-1},ee.map((j,Q)=>{var F;let[w,T]=j.split("-");return z.createElement("ol",{key:j,dir:b==="auto"?kb():b,tabIndex:-1,ref:V,className:a,"data-sonner-toaster":!0,"data-theme":te,"data-y-position":w,"data-x-position":T,style:{"--front-toast-height":`${((F=re[0])==null?void 0:F.height)||0}px`,"--offset":typeof l=="number"?`${l}px`:l||hL,"--width":`${gL}px`,"--gap":`${y}px`,..._},onBlur:P=>{ie.current&&!P.currentTarget.contains(P.relatedTarget)&&(ie.current=!1,q.current&&(q.current.focus({preventScroll:!0}),q.current=null))},onFocus:P=>{P.target instanceof HTMLElement&&P.target.dataset.dismissible==="false"||ie.current||(ie.current=!0,q.current=P.relatedTarget)},onMouseEnter:()=>J(!0),onMouseMove:()=>J(!0),onMouseLeave:()=>{fe||J(!1)},onPointerDown:P=>{P.target instanceof HTMLElement&&P.target.dataset.dismissible==="false"||ge(!0)},onPointerUp:()=>ge(!1)},M.filter(P=>!P.position&&Q===0||P.position===j).map((P,X)=>{var ue,pe;return z.createElement(_L,{key:P.id,icons:R,index:X,toast:P,defaultRichColors:p,duration:(ue=C==null?void 0:C.duration)!=null?ue:m,className:C==null?void 0:C.className,descriptionClassName:C==null?void 0:C.descriptionClassName,invert:t,visibleToasts:v,closeButton:(pe=C==null?void 0:C.closeButton)!=null?pe:i,interacting:fe,position:j,style:C==null?void 0:C.style,unstyled:C==null?void 0:C.unstyled,classNames:C==null?void 0:C.classNames,cancelButtonStyle:C==null?void 0:C.cancelButtonStyle,actionButtonStyle:C==null?void 0:C.actionButtonStyle,removeToast:H,toasts:M.filter(se=>se.position==P.position),heights:re.filter(se=>se.position==P.position),setHeights:Z,expandByDefault:o,gap:y,loadingIcon:N,expanded:U,pauseWhenPageIsHidden:k,cn:I})}))})):null};const EL=({...e})=>{const{theme:t="system"}=JI();return ne.jsx(xL,{theme:t,className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:ve-bg-background group-[.toaster]:ve-text-foreground group-[.toaster]:ve-border-border group-[.toaster]:ve-shadow-lg",description:"group-[.toast]:ve-text-muted-foreground",actionButton:"group-[.toast]:ve-bg-primary group-[.toast]:ve-text-primary-foreground",cancelButton:"group-[.toast]:ve-bg-muted group-[.toast]:ve-text-muted-foreground"}},...e})},Wu=()=>{const{sendToParent:e}=Bo("iFrameLoaded",cr),{sendToParent:t}=Bo("pushPageSets",cr),{sendToParent:n}=Bo("openQuickFind",cr);return{iFrameLoaded:e,pushPageSets:t,openQuickFind:n}},CL=()=>{const{openQuickFind:e}=Wu(),t=n=>{(n.ctrlKey||n.metaKey)&&n.key==="k"&&e()};z.useEffect(()=>(window.addEventListener("keydown",t),()=>{window.removeEventListener("keydown",t)}),[])},sg=e=>JSON.parse(e.replace(/\\"/g,'"')),uu=new zr,wL=e=>{const{iFrameLoaded:t}=Wu();z.useEffect(()=>{t({payload:{message:"iFrame is loaded"}})},[]);const[n,r]=z.useState(),[o,i]=z.useState(),[a,l]=z.useState(),[u,p]=z.useState(!1),[m,_]=z.useState(),[v,C]=z.useState(!1);return ka("getTemplateMetadata",cr,(b,y)=>{const N=e.get(y.templateId);i(N);const R=y;r(y),uu.enable(R.isxYextDebug),uu.logData("TEMPLATE_METADATA",R),uu.logData("PUCK_CONFIG",N),b({status:"success",payload:{message:"payload received"}})}),ka("getVisualConfigurationData",cr,(b,y)=>{const N=sg(y.visualConfigurationData);uu.logData("VISUAL_CONFIGURATION_DATA",N),l(N),p(!0),b({status:"success",payload:{message:"getVisualConfigurationData received"}})}),ka("getThemeData",cr,(b,y)=>{const N=sg(y);uu.logData("THEME_DATA",N),_(N),C(!0),b({status:"success",payload:{message:"getThemeData received"}})}),{visualConfigurationData:a,visualConfigurationDataFetched:u,themeData:m,themeDataFetched:v,templateMetadata:n,puckConfig:o}},NL=Dr("ve-inline-flex ve-items-center ve-justify-center ve-whitespace-nowrap ve-rounded-md ve-text-sm ve-font-medium ve-ring-offset-background ve-transition-colors focus-visible:ve-outline-none focus-visible:ve-ring-2 focus-visible:ve-ring-ring focus-visible:ve-ring-offset-2 disabled:ve-pointer-events-none disabled:ve-opacity-50",{variants:{variant:{default:"ve-bg-primary ve-text-primary-foreground hover:ve-bg-primary/90",destructive:"ve-bg-destructive ve-text-destructive-foreground hover:ve-bg-destructive/90",outline:"ve-border ve-border-input ve-bg-background hover:ve-bg-accent hover:ve-text-accent-foreground",secondary:"ve-bg-secondary ve-text-secondary-foreground hover:ve-bg-secondary/80",ghost:"hover:ve-bg-accent hover:ve-text-accent-foreground",link:"ve-text-primary ve-underline-offset-4 hover:ve-underline"},size:{default:"ve-h-10 ve-rounded-md ve-px-4 ve-py-2",sm:"ve-h-9 ve-rounded-md ve-px-3",lg:"ve-h-11 ve-rounded-md ve-px-8",icon:"ve-h-10 ve-w-10"}},defaultVariants:{variant:"default",size:"default"}}),Vi=de.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...o},i)=>{const a=r?Pa:"button";return ne.jsx(a,{className:gn(NL({variant:t,size:n,className:e})),ref:i,...o})});Vi.displayName="Button";const fN=()=>{const{dispatch:e,appState:{ui:{leftSideBarVisible:t,rightSideBarVisible:n}}}=Zt.usePuck(),r=z.useCallback(o=>{const i=window.matchMedia("(min-width: 638px)").matches,a=o==="left"?t:n,l=o==="left"?"rightSideBarVisible":"leftSideBarVisible";e({type:"setUi",ui:{[`${o}SideBarVisible`]:!a,...i?{}:{[l]:!1}}})},[e,t,n]);return ne.jsxs(ne.Fragment,{children:[ne.jsx(Vi,{variant:"ghost",size:"icon",onClick:()=>{r("left")},children:ne.jsx(LP,{className:"sm-icon"})}),ne.jsx(Vi,{variant:"ghost",size:"icon",onClick:()=>{r("right")},children:ne.jsx(FP,{className:"sm-icon"})})]})};var pm="Switch",[TL,pJ]=za(pm),[SL,OL]=TL(pm),hN=de.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:o,defaultChecked:i,required:a,disabled:l,value:u="on",onCheckedChange:p,...m}=e,[_,v]=de.useState(null),C=er(t,O=>v(O)),b=de.useRef(!1),y=_?!!_.closest("form"):!0,[N=!1,R]=Hu({prop:o,defaultProp:i,onChange:p});return ne.jsxs(SL,{scope:n,checked:N,disabled:l,children:[ne.jsx(Mn.button,{type:"button",role:"switch","aria-checked":N,"aria-required":a,"data-state":mN(N),"data-disabled":l?"":void 0,disabled:l,value:u,...m,ref:C,onClick:On(e.onClick,O=>{R(k=>!k),y&&(b.current=O.isPropagationStopped(),b.current||O.stopPropagation())})}),y&&ne.jsx(AL,{control:_,bubbles:!b.current,name:r,value:u,checked:N,required:a,disabled:l,style:{transform:"translateX(-100%)"}})]})});hN.displayName=pm;var pN="SwitchThumb",gN=de.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,o=OL(pN,n);return ne.jsx(Mn.span,{"data-state":mN(o.checked),"data-disabled":o.disabled?"":void 0,...r,ref:t})});gN.displayName=pN;var AL=e=>{const{control:t,checked:n,bubbles:r=!0,...o}=e,i=de.useRef(null),a=Lw(n),l=rm(t);return de.useEffect(()=>{const u=i.current,p=window.HTMLInputElement.prototype,_=Object.getOwnPropertyDescriptor(p,"checked").set;if(a!==n&&_){const v=new Event("click",{bubbles:r});_.call(u,n),u.dispatchEvent(v)}},[a,n,r]),ne.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:i,style:{...e.style,...l,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function mN(e){return e?"checked":"unchecked"}var vN=hN,RL=gN;const yN=de.forwardRef(({className:e,...t},n)=>ne.jsx(vN,{className:gn("ve-self-center ve-peer ve-inline-flex ve-h-5 ve-w-9 ve-shrink-0 ve-cursor-pointer ve-items-center ve-rounded-full ve-border-2 ve-border-transparent ve-transition-colors focus-visible:ve-outline-none focus-visible:ve-ring-2 focus-visible:ve-ring-ring focus-visible:ve-ring-offset-2 focus-visible:ve-ring-offset-background disabled:ve-cursor-not-allowed disabled:ve-opacity-50 data-[state=checked]:ve-bg-primary data-[state=unchecked]:ve-bg-input",e),...t,ref:n,children:ne.jsx(RL,{className:gn("ve-self-center ve-pointer-events-none ve-block ve-h-4 ve-w-4 ve-rounded-full ve-bg-background ve-shadow-lg ve-ring-0 ve-transition-transform data-[state=checked]:ve-translate-x-4 data-[state=unchecked]:ve-translate-x-0")})}));yN.displayName=vN.displayName;const bN=()=>{const{toggleTooltips:e,tooltipsVisible:t}=_w();return ne.jsx(pw,{children:ne.jsxs(gw,{children:[ne.jsx(mw,{asChild:!0,children:ne.jsxs("div",{className:"ve-flex ve-flex-row ve-self-center ve-gap-3 ve-pl-2",children:[ne.jsx(yN,{onCheckedChange:e,checked:t}),ne.jsx("p",{className:"ve-self-center ve-text-sm",children:"Entity Fields"})]})}),ne.jsxs(lm,{children:[t?"Hide Entity Fields":"Show Entity Fields",ne.jsx(vw,{fill:"ve-bg-popover"})]})]})})};var sp="focusScope.autoFocusOnMount",lp="focusScope.autoFocusOnUnmount",Pb={bubbles:!1,cancelable:!0},$L="FocusScope",_N=de.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...a}=e,[l,u]=de.useState(null),p=Zi(o),m=Zi(i),_=de.useRef(null),v=er(t,y=>u(y)),C=de.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;de.useEffect(()=>{if(r){let y=function(k){if(C.paused||!l)return;const I=k.target;l.contains(I)?_.current=I:Ra(_.current,{select:!0})},N=function(k){if(C.paused||!l)return;const I=k.relatedTarget;I!==null&&(l.contains(I)||Ra(_.current,{select:!0}))},R=function(k){if(document.activeElement===document.body)for(const M of k)M.removedNodes.length>0&&Ra(l)};document.addEventListener("focusin",y),document.addEventListener("focusout",N);const O=new MutationObserver(R);return l&&O.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",y),document.removeEventListener("focusout",N),O.disconnect()}}},[r,l,C.paused]),de.useEffect(()=>{if(l){Lb.add(C);const y=document.activeElement;if(!l.contains(y)){const R=new CustomEvent(sp,Pb);l.addEventListener(sp,p),l.dispatchEvent(R),R.defaultPrevented||(DL(LL(xN(l)),{select:!0}),document.activeElement===y&&Ra(l))}return()=>{l.removeEventListener(sp,p),setTimeout(()=>{const R=new CustomEvent(lp,Pb);l.addEventListener(lp,m),l.dispatchEvent(R),R.defaultPrevented||Ra(y??document.body,{select:!0}),l.removeEventListener(lp,m),Lb.remove(C)},0)}}},[l,p,m,C]);const b=de.useCallback(y=>{if(!n&&!r||C.paused)return;const N=y.key==="Tab"&&!y.altKey&&!y.ctrlKey&&!y.metaKey,R=document.activeElement;if(N&&R){const O=y.currentTarget,[k,I]=ML(O);k&&I?!y.shiftKey&&R===I?(y.preventDefault(),n&&Ra(k,{select:!0})):y.shiftKey&&R===k&&(y.preventDefault(),n&&Ra(I,{select:!0})):R===O&&y.preventDefault()}},[n,r,C.paused]);return ne.jsx(Mn.div,{tabIndex:-1,...a,ref:v,onKeyDown:b})});_N.displayName=$L;function DL(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Ra(r,{select:t}),document.activeElement!==n)return}function ML(e){const t=xN(e),n=Ib(t,e),r=Ib(t.reverse(),e);return[n,r]}function xN(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Ib(e,t){for(const n of e)if(!kL(n,{upTo:t}))return n}function kL(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function PL(e){return e instanceof HTMLInputElement&&"select"in e}function Ra(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&PL(e)&&t&&e.select()}}var Lb=IL();function IL(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Fb(e,t),e.unshift(t)},remove(t){var n;e=Fb(e,t),(n=e[0])==null||n.resume()}}}function Fb(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function LL(e){return e.filter(t=>t.tagName!=="A")}var cp=0;function FL(){de.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??jb()),document.body.insertAdjacentElement("beforeend",e[1]??jb()),cp++,()=>{cp===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),cp--}},[])}function jb(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}var vi=function(){return vi=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},vi.apply(this,arguments)};function EN(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function jL(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,i;r<o;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}var nf="right-scroll-bar-position",rf="width-before-scroll-bar",BL="with-scroll-bars-hidden",HL="--removed-body-scroll-bar-size";function up(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function WL(e,t){var n=z.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var zL=typeof window<"u"?de.useLayoutEffect:de.useEffect,Bb=new WeakMap;function KL(e,t){var n=WL(null,function(r){return e.forEach(function(o){return up(o,r)})});return zL(function(){var r=Bb.get(n);if(r){var o=new Set(r),i=new Set(e),a=n.current;o.forEach(function(l){i.has(l)||up(l,null)}),i.forEach(function(l){o.has(l)||up(l,a)})}Bb.set(n,e)},[e]),n}function GL(e){return e}function UL(e,t){t===void 0&&(t=GL);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(i){var a=t(i,r);return n.push(a),function(){n=n.filter(function(l){return l!==a})}},assignSyncMedium:function(i){for(r=!0;n.length;){var a=n;n=[],a.forEach(i)}n={push:function(l){return i(l)},filter:function(){return n}}},assignMedium:function(i){r=!0;var a=[];if(n.length){var l=n;n=[],l.forEach(i),a=n}var u=function(){var m=a;a=[],m.forEach(i)},p=function(){return Promise.resolve().then(u)};p(),n={push:function(m){a.push(m),p()},filter:function(m){return a=a.filter(m),n}}}};return o}function VL(e){e===void 0&&(e={});var t=UL(null);return t.options=vi({async:!0,ssr:!1},e),t}var CN=function(e){var t=e.sideCar,n=EN(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return de.createElement(r,vi({},n))};CN.isSideCarExport=!0;function YL(e,t){return e.useMedium(t),CN}var wN=VL(),dp=function(){},Wf=de.forwardRef(function(e,t){var n=de.useRef(null),r=de.useState({onScrollCapture:dp,onWheelCapture:dp,onTouchMoveCapture:dp}),o=r[0],i=r[1],a=e.forwardProps,l=e.children,u=e.className,p=e.removeScrollBar,m=e.enabled,_=e.shards,v=e.sideCar,C=e.noIsolation,b=e.inert,y=e.allowPinchZoom,N=e.as,R=N===void 0?"div":N,O=e.gapMode,k=EN(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),I=v,M=KL([n,t]),Y=vi(vi({},k),o);return de.createElement(de.Fragment,null,m&&de.createElement(I,{sideCar:wN,removeScrollBar:p,shards:_,noIsolation:C,inert:b,setCallbacks:i,allowPinchZoom:!!y,lockRef:n,gapMode:O}),a?de.cloneElement(de.Children.only(l),vi(vi({},Y),{ref:M})):de.createElement(R,vi({},Y,{className:u,ref:M}),l))});Wf.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Wf.classNames={fullWidth:rf,zeroRight:nf};var qL=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function ZL(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=qL();return t&&e.setAttribute("nonce",t),e}function JL(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function XL(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var QL=function(){var e=0,t=null;return{add:function(n){e==0&&(t=ZL())&&(JL(t,n),XL(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},eF=function(){var e=QL();return function(t,n){de.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},NN=function(){var e=eF(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},tF={left:0,top:0,right:0,gap:0},fp=function(e){return parseInt(e||"",10)||0},nF=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[fp(n),fp(r),fp(o)]},rF=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return tF;var t=nF(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},oF=NN(),Kl="data-scroll-locked",iF=function(e,t,n,r){var o=e.left,i=e.top,a=e.right,l=e.gap;return n===void 0&&(n="margin"),`
|
|
186
|
-
.`.concat(BL,` {
|
|
187
|
-
overflow: hidden `).concat(r,`;
|
|
188
|
-
padding-right: `).concat(l,"px ").concat(r,`;
|
|
189
|
-
}
|
|
190
|
-
body[`).concat(Kl,`] {
|
|
191
|
-
overflow: hidden `).concat(r,`;
|
|
192
|
-
overscroll-behavior: contain;
|
|
193
|
-
`).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
|
|
194
|
-
padding-left: `.concat(o,`px;
|
|
195
|
-
padding-top: `).concat(i,`px;
|
|
196
|
-
padding-right: `).concat(a,`px;
|
|
197
|
-
margin-left:0;
|
|
198
|
-
margin-top:0;
|
|
199
|
-
margin-right: `).concat(l,"px ").concat(r,`;
|
|
200
|
-
`),n==="padding"&&"padding-right: ".concat(l,"px ").concat(r,";")].filter(Boolean).join(""),`
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
.`).concat(nf,` {
|
|
204
|
-
right: `).concat(l,"px ").concat(r,`;
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
.`).concat(rf,` {
|
|
208
|
-
margin-right: `).concat(l,"px ").concat(r,`;
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
.`).concat(nf," .").concat(nf,` {
|
|
212
|
-
right: 0 `).concat(r,`;
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
.`).concat(rf," .").concat(rf,` {
|
|
216
|
-
margin-right: 0 `).concat(r,`;
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
body[`).concat(Kl,`] {
|
|
220
|
-
`).concat(HL,": ").concat(l,`px;
|
|
221
|
-
}
|
|
222
|
-
`)},Hb=function(){var e=parseInt(document.body.getAttribute(Kl)||"0",10);return isFinite(e)?e:0},aF=function(){de.useEffect(function(){return document.body.setAttribute(Kl,(Hb()+1).toString()),function(){var e=Hb()-1;e<=0?document.body.removeAttribute(Kl):document.body.setAttribute(Kl,e.toString())}},[])},sF=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;aF();var i=de.useMemo(function(){return rF(o)},[o]);return de.createElement(oF,{styles:iF(i,!t,o,n?"":"!important")})},lg=!1;if(typeof window<"u")try{var Wd=Object.defineProperty({},"passive",{get:function(){return lg=!0,!0}});window.addEventListener("test",Wd,Wd),window.removeEventListener("test",Wd,Wd)}catch{lg=!1}var vl=lg?{passive:!1}:!1,lF=function(e){return e.tagName==="TEXTAREA"},TN=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!lF(e)&&n[t]==="visible")},cF=function(e){return TN(e,"overflowY")},uF=function(e){return TN(e,"overflowX")},Wb=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=SN(e,r);if(o){var i=ON(e,r),a=i[1],l=i[2];if(a>l)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},dF=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},fF=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},SN=function(e,t){return e==="v"?cF(t):uF(t)},ON=function(e,t){return e==="v"?dF(t):fF(t)},hF=function(e,t){return e==="h"&&t==="rtl"?-1:1},pF=function(e,t,n,r,o){var i=hF(e,window.getComputedStyle(t).direction),a=i*r,l=n.target,u=t.contains(l),p=!1,m=a>0,_=0,v=0;do{var C=ON(e,l),b=C[0],y=C[1],N=C[2],R=y-N-i*b;(b||R)&&SN(e,l)&&(_+=R,v+=b),l instanceof ShadowRoot?l=l.host:l=l.parentNode}while(!u&&l!==document.body||u&&(t.contains(l)||t===l));return(m&&(Math.abs(_)<1||!o)||!m&&(Math.abs(v)<1||!o))&&(p=!0),p},zd=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},zb=function(e){return[e.deltaX,e.deltaY]},Kb=function(e){return e&&"current"in e?e.current:e},gF=function(e,t){return e[0]===t[0]&&e[1]===t[1]},mF=function(e){return`
|
|
223
|
-
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
224
|
-
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
225
|
-
`)},vF=0,yl=[];function yF(e){var t=de.useRef([]),n=de.useRef([0,0]),r=de.useRef(),o=de.useState(vF++)[0],i=de.useState(NN)[0],a=de.useRef(e);de.useEffect(function(){a.current=e},[e]),de.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var y=jL([e.lockRef.current],(e.shards||[]).map(Kb),!0).filter(Boolean);return y.forEach(function(N){return N.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),y.forEach(function(N){return N.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var l=de.useCallback(function(y,N){if("touches"in y&&y.touches.length===2)return!a.current.allowPinchZoom;var R=zd(y),O=n.current,k="deltaX"in y?y.deltaX:O[0]-R[0],I="deltaY"in y?y.deltaY:O[1]-R[1],M,Y=y.target,ee=Math.abs(k)>Math.abs(I)?"h":"v";if("touches"in y&&ee==="h"&&Y.type==="range")return!1;var re=Wb(ee,Y);if(!re)return!0;if(re?M=ee:(M=ee==="v"?"h":"v",re=Wb(ee,Y)),!re)return!1;if(!r.current&&"changedTouches"in y&&(k||I)&&(r.current=M),!M)return!0;var Z=r.current||M;return pF(Z,N,y,Z==="h"?k:I,!0)},[]),u=de.useCallback(function(y){var N=y;if(!(!yl.length||yl[yl.length-1]!==i)){var R="deltaY"in N?zb(N):zd(N),O=t.current.filter(function(M){return M.name===N.type&&(M.target===N.target||N.target===M.shadowParent)&&gF(M.delta,R)})[0];if(O&&O.should){N.cancelable&&N.preventDefault();return}if(!O){var k=(a.current.shards||[]).map(Kb).filter(Boolean).filter(function(M){return M.contains(N.target)}),I=k.length>0?l(N,k[0]):!a.current.noIsolation;I&&N.cancelable&&N.preventDefault()}}},[]),p=de.useCallback(function(y,N,R,O){var k={name:y,delta:N,target:R,should:O,shadowParent:bF(R)};t.current.push(k),setTimeout(function(){t.current=t.current.filter(function(I){return I!==k})},1)},[]),m=de.useCallback(function(y){n.current=zd(y),r.current=void 0},[]),_=de.useCallback(function(y){p(y.type,zb(y),y.target,l(y,e.lockRef.current))},[]),v=de.useCallback(function(y){p(y.type,zd(y),y.target,l(y,e.lockRef.current))},[]);de.useEffect(function(){return yl.push(i),e.setCallbacks({onScrollCapture:_,onWheelCapture:_,onTouchMoveCapture:v}),document.addEventListener("wheel",u,vl),document.addEventListener("touchmove",u,vl),document.addEventListener("touchstart",m,vl),function(){yl=yl.filter(function(y){return y!==i}),document.removeEventListener("wheel",u,vl),document.removeEventListener("touchmove",u,vl),document.removeEventListener("touchstart",m,vl)}},[]);var C=e.removeScrollBar,b=e.inert;return de.createElement(de.Fragment,null,b?de.createElement(i,{styles:mF(o)}):null,C?de.createElement(sF,{gapMode:e.gapMode}):null)}function bF(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const _F=YL(wN,yF);var AN=de.forwardRef(function(e,t){return de.createElement(Wf,vi({},e,{ref:t,sideCar:_F}))});AN.classNames=Wf.classNames;var xF=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},bl=new WeakMap,Kd=new WeakMap,Gd={},hp=0,RN=function(e){return e&&(e.host||RN(e.parentNode))},EF=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=RN(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},CF=function(e,t,n,r){var o=EF(t,Array.isArray(e)?e:[e]);Gd[n]||(Gd[n]=new WeakMap);var i=Gd[n],a=[],l=new Set,u=new Set(o),p=function(_){!_||l.has(_)||(l.add(_),p(_.parentNode))};o.forEach(p);var m=function(_){!_||u.has(_)||Array.prototype.forEach.call(_.children,function(v){if(l.has(v))m(v);else try{var C=v.getAttribute(r),b=C!==null&&C!=="false",y=(bl.get(v)||0)+1,N=(i.get(v)||0)+1;bl.set(v,y),i.set(v,N),a.push(v),y===1&&b&&Kd.set(v,!0),N===1&&v.setAttribute(n,"true"),b||v.setAttribute(r,"true")}catch(R){console.error("aria-hidden: cannot operate on ",v,R)}})};return m(t),l.clear(),hp++,function(){a.forEach(function(_){var v=bl.get(_)-1,C=i.get(_)-1;bl.set(_,v),i.set(_,C),v||(Kd.has(_)||_.removeAttribute(r),Kd.delete(_)),C||_.removeAttribute(n)}),hp--,hp||(bl=new WeakMap,bl=new WeakMap,Kd=new WeakMap,Gd={})}},wF=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=xF(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),CF(r,o,n,"aria-hidden")):function(){return null}},gm="Dialog",[$N,DN]=za(gm),[NF,Vo]=$N(gm),MN=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:i,modal:a=!0}=e,l=de.useRef(null),u=de.useRef(null),[p=!1,m]=Hu({prop:r,defaultProp:o,onChange:i});return ne.jsx(NF,{scope:t,triggerRef:l,contentRef:u,contentId:xu(),titleId:xu(),descriptionId:xu(),open:p,onOpenChange:m,onOpenToggle:de.useCallback(()=>m(_=>!_),[m]),modal:a,children:n})};MN.displayName=gm;var kN="DialogTrigger",PN=de.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Vo(kN,n),i=er(t,o.triggerRef);return ne.jsx(Mn.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":ym(o.open),...r,ref:i,onClick:On(e.onClick,o.onOpenToggle)})});PN.displayName=kN;var mm="DialogPortal",[TF,IN]=$N(mm,{forceMount:void 0}),LN=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,i=Vo(mm,t);return ne.jsx(TF,{scope:t,forceMount:n,children:de.Children.map(r,a=>ne.jsx(Bu,{present:n||i.open,children:ne.jsx(XC,{asChild:!0,container:o,children:a})}))})};LN.displayName=mm;var mf="DialogOverlay",FN=de.forwardRef((e,t)=>{const n=IN(mf,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=Vo(mf,e.__scopeDialog);return i.modal?ne.jsx(Bu,{present:r||i.open,children:ne.jsx(SF,{...o,ref:t})}):null});FN.displayName=mf;var SF=de.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Vo(mf,n);return ne.jsx(AN,{as:Pa,allowPinchZoom:!0,shards:[o.contentRef],children:ne.jsx(Mn.div,{"data-state":ym(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),ws="DialogContent",jN=de.forwardRef((e,t)=>{const n=IN(ws,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=Vo(ws,e.__scopeDialog);return ne.jsx(Bu,{present:r||i.open,children:i.modal?ne.jsx(OF,{...o,ref:t}):ne.jsx(AF,{...o,ref:t})})});jN.displayName=ws;var OF=de.forwardRef((e,t)=>{const n=Vo(ws,e.__scopeDialog),r=de.useRef(null),o=er(t,n.contentRef,r);return de.useEffect(()=>{const i=r.current;if(i)return wF(i)},[]),ne.jsx(BN,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:On(e.onCloseAutoFocus,i=>{var a;i.preventDefault(),(a=n.triggerRef.current)==null||a.focus()}),onPointerDownOutside:On(e.onPointerDownOutside,i=>{const a=i.detail.originalEvent,l=a.button===0&&a.ctrlKey===!0;(a.button===2||l)&&i.preventDefault()}),onFocusOutside:On(e.onFocusOutside,i=>i.preventDefault())})}),AF=de.forwardRef((e,t)=>{const n=Vo(ws,e.__scopeDialog),r=de.useRef(!1),o=de.useRef(!1);return ne.jsx(BN,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var a,l;(a=e.onCloseAutoFocus)==null||a.call(e,i),i.defaultPrevented||(r.current||(l=n.triggerRef.current)==null||l.focus(),i.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:i=>{var u,p;(u=e.onInteractOutside)==null||u.call(e,i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const a=i.target;((p=n.triggerRef.current)==null?void 0:p.contains(a))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&o.current&&i.preventDefault()}})}),BN=de.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,...a}=e,l=Vo(ws,n),u=de.useRef(null),p=er(t,u);return FL(),ne.jsxs(ne.Fragment,{children:[ne.jsx(_N,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i,children:ne.jsx(qg,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":ym(l.open),...a,ref:p,onDismiss:()=>l.onOpenChange(!1)})}),ne.jsxs(ne.Fragment,{children:[ne.jsx($F,{titleId:l.titleId}),ne.jsx(MF,{contentRef:u,descriptionId:l.descriptionId})]})]})}),vm="DialogTitle",HN=de.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Vo(vm,n);return ne.jsx(Mn.h2,{id:o.titleId,...r,ref:t})});HN.displayName=vm;var WN="DialogDescription",zN=de.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Vo(WN,n);return ne.jsx(Mn.p,{id:o.descriptionId,...r,ref:t})});zN.displayName=WN;var KN="DialogClose",GN=de.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Vo(KN,n);return ne.jsx(Mn.button,{type:"button",...r,ref:t,onClick:On(e.onClick,()=>o.onOpenChange(!1))})});GN.displayName=KN;function ym(e){return e?"open":"closed"}var UN="DialogTitleWarning",[RF,VN]=ND(UN,{contentName:ws,titleName:vm,docsSlug:"dialog"}),$F=({titleId:e})=>{const t=VN(UN),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
226
|
-
|
|
227
|
-
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
228
|
-
|
|
229
|
-
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return de.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},DF="DialogDescriptionWarning",MF=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${VN(DF).contentName}}.`;return de.useEffect(()=>{var i;const o=(i=e.current)==null?void 0:i.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},kF=MN,PF=PN,IF=LN,LF=FN,FF=jN,jF=HN,BF=zN,YN=GN,qN="AlertDialog",[HF,gJ]=za(qN,[DN]),ea=DN(),ZN=e=>{const{__scopeAlertDialog:t,...n}=e,r=ea(t);return ne.jsx(kF,{...r,...n,modal:!0})};ZN.displayName=qN;var WF="AlertDialogTrigger",JN=de.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=ea(n);return ne.jsx(PF,{...o,...r,ref:t})});JN.displayName=WF;var zF="AlertDialogPortal",XN=e=>{const{__scopeAlertDialog:t,...n}=e,r=ea(t);return ne.jsx(IF,{...r,...n})};XN.displayName=zF;var KF="AlertDialogOverlay",QN=de.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=ea(n);return ne.jsx(LF,{...o,...r,ref:t})});QN.displayName=KF;var Gl="AlertDialogContent",[GF,UF]=HF(Gl),eT=de.forwardRef((e,t)=>{const{__scopeAlertDialog:n,children:r,...o}=e,i=ea(n),a=de.useRef(null),l=er(t,a),u=de.useRef(null);return ne.jsx(RF,{contentName:Gl,titleName:tT,docsSlug:"alert-dialog",children:ne.jsx(GF,{scope:n,cancelRef:u,children:ne.jsxs(FF,{role:"alertdialog",...i,...o,ref:l,onOpenAutoFocus:On(o.onOpenAutoFocus,p=>{var m;p.preventDefault(),(m=u.current)==null||m.focus({preventScroll:!0})}),onPointerDownOutside:p=>p.preventDefault(),onInteractOutside:p=>p.preventDefault(),children:[ne.jsx(Sg,{children:r}),ne.jsx(YF,{contentRef:a})]})})})});eT.displayName=Gl;var tT="AlertDialogTitle",nT=de.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=ea(n);return ne.jsx(jF,{...o,...r,ref:t})});nT.displayName=tT;var rT="AlertDialogDescription",oT=de.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=ea(n);return ne.jsx(BF,{...o,...r,ref:t})});oT.displayName=rT;var VF="AlertDialogAction",iT=de.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=ea(n);return ne.jsx(YN,{...o,...r,ref:t})});iT.displayName=VF;var aT="AlertDialogCancel",sT=de.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,{cancelRef:o}=UF(aT,n),i=ea(n),a=er(t,o);return ne.jsx(YN,{...i,...r,ref:a})});sT.displayName=aT;var YF=({contentRef:e})=>{const t=`\`${Gl}\` requires a description for the component to be accessible for screen reader users.
|
|
230
|
-
|
|
231
|
-
You can add a description to the \`${Gl}\` by passing a \`${rT}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
|
|
232
|
-
|
|
233
|
-
Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${Gl}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
|
|
234
|
-
|
|
235
|
-
For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return de.useEffect(()=>{var r;document.getElementById((r=e.current)==null?void 0:r.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},qF=ZN,ZF=JN,JF=XN,lT=QN,cT=eT,uT=iT,dT=sT,fT=nT,hT=oT;const bm=Dr("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-secondary active:bg-primary-foreground active:text-primary active:border-primary focus:border-2",secondary:"bg-primary-foreground text-primary border-2 border-primary hover:bg-primary hover:text-primary-foreground active:bg-secondary active:text-secondary-foreground focus:border-2",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border-primary border-input bg-background hover:bg-accent hover:text-accent-foreground",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 rounded-md px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),XF=de.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...o},i)=>{const a=r?Pa:"button";return ne.jsx(a,{className:gn(bm({variant:t,size:n,className:e})),ref:i,...o})});XF.displayName="Button";const QF=qF,e2=ZF,t2=JF,pT=de.forwardRef(({className:e,...t},n)=>ne.jsx(lT,{className:gn("ve-fixed ve-inset-0 ve-z-50 ve-bg-black/80 data-[state=open]:ve-animate-in data-[state=closed]:ve-animate-out data-[state=closed]:ve-fade-out-0 data-[state=open]:ve-fade-in-0",e),...t,ref:n}));pT.displayName=lT.displayName;const gT=de.forwardRef(({className:e,...t},n)=>ne.jsxs(t2,{children:[ne.jsx(pT,{}),ne.jsx(cT,{ref:n,className:gn("ve-fixed ve-left-[50%] ve-top-[50%] ve-z-50 ve-grid ve-w-full ve-max-w-lg ve-translate-x-[-50%] ve-translate-y-[-50%] ve-gap-4 ve-border ve-bg-background ve-p-6 ve-shadow-lg ve-duration-200 data-[state=open]:ve-animate-in data-[state=closed]:ve-animate-out data-[state=closed]:ve-fade-out-0 data-[state=open]:ve-fade-in-0 data-[state=closed]:ve-zoom-out-95 data-[state=open]:ve-zoom-in-95 data-[state=closed]:ve-slide-out-to-left-1/2 data-[state=closed]:ve-slide-out-to-top-[48%] data-[state=open]:ve-slide-in-from-left-1/2 data-[state=open]:ve-slide-in-from-top-[48%] sm:ve-rounded-lg",e),...t})]}));gT.displayName=cT.displayName;const mT=({className:e,...t})=>ne.jsx("div",{className:gn("ve-flex ve-flex-col ve-space-y-2 ve-text-center sm:ve-text-left",e),...t});mT.displayName="AlertDialogHeader";const vT=({className:e,...t})=>ne.jsx("div",{className:gn("ve-flex ve-flex-col-reverse sm:ve-flex-row sm:ve-justify-end sm:ve-space-x-2",e),...t});vT.displayName="AlertDialogFooter";const yT=de.forwardRef(({className:e,...t},n)=>ne.jsx(fT,{ref:n,className:gn("ve-text-lg ve-font-semibold",e),...t}));yT.displayName=fT.displayName;const bT=de.forwardRef(({className:e,...t},n)=>ne.jsx(hT,{ref:n,className:gn("ve-text-sm ve-text-muted-foreground",e),...t}));bT.displayName=hT.displayName;const n2=de.forwardRef(({className:e,...t},n)=>ne.jsx(uT,{ref:n,className:gn(bm(),e),...t}));n2.displayName=uT.displayName;const _T=de.forwardRef(({className:e,...t},n)=>ne.jsx(dT,{ref:n,className:gn(bm({variant:"outline"}),"ve-mt-2 sm:ve-mt-0",e),...t}));_T.displayName=dT.displayName;const xT=({disabled:e,onClearLocalChanges:t})=>{const[n,r]=z.useState(!1),o=()=>{t(),r(!1)};return ne.jsxs(QF,{open:n,onOpenChange:r,children:[ne.jsx(e2,{disabled:e,asChild:!0,children:ne.jsx(Vi,{variant:"outline",children:"Clear Local Changes"})}),ne.jsxs(gT,{children:[ne.jsxs(mT,{children:[ne.jsx(yT,{children:"Clear Local Changes"}),ne.jsx(bT,{children:"This action will remove your local changes. It cannot be undone."})]}),ne.jsxs(vT,{children:[ne.jsx(_T,{children:"Cancel"}),ne.jsx(Vi,{onClick:o,children:"Confirm"})]})]})]})},r2=e=>{const{onClearLocalChanges:t,onHistoryChange:n,onPublishLayout:r,isDevMode:o}=e,{appState:i,history:{back:a,forward:l,histories:u,index:p,hasPast:m,hasFuture:_,setHistories:v}}=Zt.usePuck();return z.useEffect(()=>{n(u,p)},[p,u,n]),ne.jsxs("header",{className:"puck-header",children:[ne.jsxs("div",{className:"header-left",children:[ne.jsx(fN,{}),ne.jsx(bN,{})]}),ne.jsx("div",{className:"header-center"}),ne.jsxs("div",{className:"actions",children:[ne.jsx(Vi,{variant:"ghost",size:"icon",disabled:!m,onClick:a,children:ne.jsx(BP,{className:"sm-icon"})}),ne.jsx(Vi,{variant:"ghost",size:"icon",disabled:!_,onClick:l,children:ne.jsx(HP,{className:"sm-icon"})}),ne.jsx(xT,{disabled:u.length===1,onClearLocalChanges:()=>{t(),v([{id:"root",state:{data:u[0].state.data}}])}}),!o&&ne.jsx(Vi,{variant:"secondary",disabled:u.length===1,onClick:async()=>{await r(i.data),t(),v([{id:"root",state:{data:i.data}}])},children:"Publish"})]})]})},_l=new zr,o2=({puckConfig:e,puckInitialHistory:t,isLoading:n,clearHistory:r,templateMetadata:o,layoutSaveState:i,saveLayoutSaveState:a,publishVisualConfiguration:l,sendDevSaveStateData:u,buildVisualConfigLocalStorageKey:p})=>{const[m,_]=z.useState(!1),v=z.useRef(0),C=z.useCallback((R,O)=>{O!==0&&v.current!==O&&R.length>0&&(_l.logFunc("handleHistoryChange"),_l.logData("PUCK_INDEX",O),_l.logData("PUCK_HISTORY",R),v.current=O,_l.logFunc("saveToLocalStorage"),window.localStorage.setItem(p(),JSON.stringify(R)),(i==null?void 0:i.hash)!==R[O].id&&(o.isDevMode&&!o.devOverride?(_l.logFunc("sendDevSaveStateData"),u({payload:{devSaveStateData:JSON.stringify(R[O].state.data)}})):(_l.logFunc("saveLayoutSaveState"),a({payload:{hash:R[O].id,history:JSON.stringify(R[O].state)}}))))},[o,p,i]),b=()=>{r(),v.current=0},y=async R=>{l({payload:{visualConfigurationData:JSON.stringify(R)}})},N=async()=>{if(!n&&!m){_(!0);return}};return ne.jsx(bw,{children:ne.jsx(Zt.Puck,{config:e,data:{},initialHistory:t,onChange:N,overrides:{header:()=>ne.jsx(r2,{onClearLocalChanges:b,onHistoryChange:C,onPublishLayout:y,isDevMode:o.isDevMode})}})})},i2={GLOBAL:"global",INDIVIDUAL:"individual"},Gb="ROLE_",Ub="TEMPLATE_",a2="LAYOUT_",s2="ENTITY_",l2=new zr,c2=e=>{const t=z.useCallback(()=>e?u2(e.isDevMode&&!e.devOverride,e.role,e.templateId,e.layoutId,e.entityId):"",[e]);return{clearVisualConfigLocalStorage:()=>{l2.logFunc("clearVisualConfigLocalStorage"),window.localStorage.removeItem(t())},buildVisualConfigLocalStorageKey:t}};function u2(e,t,n,r,o){const i=e?"dev":"";if(!t||!n||!o&&!r)throw new Error(`Unable to generate local storage key, missing query parameters${!o&&" entityId"}${!r&&" layoutId"}`);if(t===i2.INDIVIDUAL){if(!o)throw new Error(`EntityId required for role ${t}`);return i+Gb+t+Ub+n+s2+o}if(!r)throw new Error(`LayoutId required for role ${t}`);return i+Gb+t+Ub+n+a2+r}const d2=()=>{const{sendToParent:e}=Bo("saveSaveState",cr),{sendToParent:t}=Bo("deleteSaveState",cr),{sendToParent:n}=Bo("saveVisualConfigData",cr),{sendToParent:r}=Bo("sendDevSaveStateData",cr);return{saveLayoutSaveState:e,deleteLayoutSaveState:t,publishVisualConfiguration:n,sendDevLayoutSaveStateData:r}},f2=new zr,h2=()=>{const{iFrameLoaded:e}=Wu();z.useEffect(()=>{e({payload:{message:"Layout Editor is loaded"}})},[]);const[t,n]=z.useState(),[r,o]=z.useState(!1);return ka("getSaveState",cr,(i,a)=>{let l;a&&(l={...a,history:sg(a.history)}),f2.logData("SAVE_STATE",l),n(l),o(!0),i({status:"success",payload:{message:"saveState received"}})}),{layoutSaveState:t,layoutSaveStateFetched:r}},p2=(e,t)=>{const n=g2(e);return t&&Object.entries(n).forEach(([r])=>{t[r]&&(n[r]=t[r])}),n},g2=e=>{const t={};for(const n in e){const r=e[n].styles;for(const o in r){const i=r[o];if("default"in i)t[`--${i.plugin}-${n}-${o}`]=typeof i.default=="number"?`${i.default}px`:i.default;else if("styles"in i)for(const a in i.styles)t[`--${i.plugin}-${n}-${o}-${a}`]=typeof i.styles[a].default=="number"?`${i.styles[a].default}px`:i.styles[a].default}}return t},m2=(e,t,n)=>{const r={};for(const o in n.styles){const i=n.styles[o];if("default"in i)i.type==="number"?r[`--${i.plugin}-${t}-${o}`]=e[o]+"px":r[`--${i.plugin}-${t}-${o}`]=e[o];else for(const a in i.styles)i.styles[a].type==="number"?r[`--${i.plugin}-${t}-${o}-${a}`]=e[o][a]+"px":r[`--${i.plugin}-${t}-${o}-${a}`]=e[o][a]}return r},ET="visual-editor-theme",vf=new zr,v2=(e,t,n)=>{var a,l;vf.logFunc("applyTheme");const r=(a=e==null?void 0:e._site)==null?void 0:a.pagesTheme;let o;(r==null?void 0:r.length)>0&&(o=e.siteId!==0?r.find(u=>Number(u.themeConfiguration.siteId)===e.siteId):r[0]);let i;return o!=null&&o.themeConfiguration&&(i=JSON.parse((l=o.themeConfiguration)==null?void 0:l.data)),Object.keys(t).length>0?`${n??""}<style id="${ET}" type="text/css">${CT(i,t)}</style>`:n??""},CT=(e,t)=>{vf.logFunc("internalApplyTheme");const n=p2(t,e);return!n||Object.keys(n).length===0?"":(vf.logData("THEME_VALUES_TO_APPLY",n),".components{"+Object.entries(n).map(([r,o])=>`${r}:${o} !important`).join(";")+"}")},zf=async(e,t)=>{vf.logFunc("updateThemeInEditor");const n=new MutationObserver(()=>{var i;const o=(i=document.getElementById("preview-frame").contentDocument)==null?void 0:i.getElementById(ET);o&&(n.disconnect(),o.innerText=CT(e,t))});n.observe(document,{childList:!0,subtree:!0})},pi=new zr,y2=e=>{const{puckConfig:t,templateMetadata:n,visualConfigurationData:r,themeData:o,themeConfig:i}=e,{sendDevLayoutSaveStateData:a,saveLayoutSaveState:l,publishVisualConfiguration:u,deleteLayoutSaveState:p}=d2(),{layoutSaveState:m,layoutSaveStateFetched:_}=h2(),{buildVisualConfigLocalStorageKey:v,clearVisualConfigLocalStorage:C}=c2(n),[b,y]=z.useState(),[N,R]=z.useState(!1),O=()=>{pi.logFunc("clearHistory"),C(),p()};z.useEffect(()=>{pi.logData("THEME_DATA",o),o&&i&&zf(o,i)},[o,i]);const k=z.useCallback(()=>{if(!n)return;if(pi.logFunc("loadPuckInitialHistory"),n.isDevMode&&!n.devOverride){const re=window.localStorage.getItem(v());if(re){pi.log("Layout Dev Mode - Using layout data from localStorage");const Z=JSON.parse(re),U=Z.length-1;y({histories:Z,index:U,appendData:!1}),R(!0);return}pi.log("Layout Dev Mode - No localStorage. Using layout data from Content"),r&&y({histories:[{id:"root",state:{data:r}}],appendData:!1}),R(!0);return}if(!m){C(),pi.log("Layout Prod Mode - No saveState. Using layout data from Content"),r&&y({histories:[{id:"root",state:{data:r}}],appendData:!1}),R(!0);return}const Y=window.localStorage.getItem(v());if(!Y){pi.log("Layout Prod Mode - No localStorage. Using layout saveState"),y({histories:r?[{id:"root",state:{data:r}},{id:m.hash,state:{data:m.history.data}}]:[{id:m.hash,state:{data:m.history.data}}],index:r?1:0,appendData:!1}),R(!0);return}const ee=JSON.parse(Y).findIndex(re=>re.id===(m==null?void 0:m.hash));if(ee!==-1){pi.log("Layout Prod Mode - Using localStorage visual configuration"),y({histories:JSON.parse(Y),index:ee,appendData:!1}),R(!0);return}C()},[y,R,C,v]);z.useEffect(()=>{_&&k()},[n,_]),z.useEffect(()=>{b&&pi.logData("PUCK_INITIAL_HISTORY",b)},[b]),z.useEffect(()=>{if(!N)return;const Y=b==null?void 0:b.histories[b.histories.length-1].state.data;pi.logFunc("sendDevSaveStateData useEffect"),a({payload:{devSaveStateData:JSON.stringify(Y)}})},[N,b,n]);const I=!N||!_,M=60+(N+_)*20;return I?ne.jsx(hm,{progress:M}):ne.jsx(o2,{puckConfig:t,puckInitialHistory:b,isLoading:I,clearHistory:O,templateMetadata:n,layoutSaveState:m,saveLayoutSaveState:l,publishVisualConfiguration:u,sendDevSaveStateData:a,buildVisualConfigLocalStorageKey:v})},b2="SITE_",_2="THEME_",x2=new zr,E2=e=>{const t=z.useCallback(()=>e?C2(e.isDevMode,e.siteId,e.themeEntityId):"",[e]);return{clearThemeLocalStorage:()=>{x2.logFunc("clearThemeLocalStorage"),window.localStorage.removeItem(t())},buildThemeLocalStorageKey:t}};function C2(e,t,n){if(!n)throw new Error("Unable to generate local storage key for themes, missing themeEntityId");return(e?"dev":"")+b2+t+_2+n}const w2=Dr("ve-relative ve-rounded ve-border ve-m-4 ve-mb-0 ve-p-4 ve-[&>svg~*]:pl-7 ve-[&>svg+div]:translate-y-[-3px] ve-[&>svg]:absolute ve-[&>svg]:left-4 ve-[&>svg]:top-4 ve-[&>svg]:text-foreground",{variants:{variant:{default:"ve-bg-background ve-text-foreground",destructive:"ve-border-destructive/50 ve-text-destructive ve-dark:border-destructive ve-[&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),cg=z.forwardRef(({className:e,variant:t,...n},r)=>ne.jsx("div",{ref:r,role:"alert",className:gn(w2({variant:t}),e),...n}));cg.displayName="Alert";const N2=z.forwardRef(({className:e,...t},n)=>ne.jsx("h5",{ref:n,className:gn("ve-mb-1 ve-font-medium ve-leading-none ve-tracking-tight",e),...t}));N2.displayName="AlertTitle";const ug=z.forwardRef(({className:e,...t},n)=>ne.jsx("div",{ref:n,className:gn("ve-text-sm [&_p]:ve-leading-relaxed",e),...t}));ug.displayName="AlertDescription";var vo={},zu={},T2=typeof Nd=="object"&&Nd&&Nd.Object===Object&&Nd,wT=T2,S2=wT,O2=typeof self=="object"&&self&&self.Object===Object&&self,A2=S2||O2||Function("return this")(),wi=A2,R2=wi,$2=R2.Symbol,Ku=$2,Vb=Ku,NT=Object.prototype,D2=NT.hasOwnProperty,M2=NT.toString,du=Vb?Vb.toStringTag:void 0;function k2(e){var t=D2.call(e,du),n=e[du];try{e[du]=void 0;var r=!0}catch{}var o=M2.call(e);return r&&(t?e[du]=n:delete e[du]),o}var P2=k2,I2=Object.prototype,L2=I2.toString;function F2(e){return L2.call(e)}var j2=F2,Yb=Ku,B2=P2,H2=j2,W2="[object Null]",z2="[object Undefined]",qb=Yb?Yb.toStringTag:void 0;function K2(e){return e==null?e===void 0?z2:W2:qb&&qb in Object(e)?B2(e):H2(e)}var As=K2,G2=Array.isArray,Yo=G2;function U2(e){return e!=null&&typeof e=="object"}var ta=U2,V2=As,Y2=Yo,q2=ta,Z2="[object String]";function J2(e){return typeof e=="string"||!Y2(e)&&q2(e)&&V2(e)==Z2}var X2=J2;function Q2(e){return function(t,n,r){for(var o=-1,i=Object(t),a=r(t),l=a.length;l--;){var u=a[e?l:++o];if(n(i[u],u,i)===!1)break}return t}}var ej=Q2,tj=ej,nj=tj(),rj=nj;function oj(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var ij=oj,aj=As,sj=ta,lj="[object Arguments]";function cj(e){return sj(e)&&aj(e)==lj}var uj=cj,Zb=uj,dj=ta,TT=Object.prototype,fj=TT.hasOwnProperty,hj=TT.propertyIsEnumerable,pj=Zb(function(){return arguments}())?Zb:function(e){return dj(e)&&fj.call(e,"callee")&&!hj.call(e,"callee")},ST=pj,yf={exports:{}};function gj(){return!1}var mj=gj;yf.exports;(function(e,t){var n=wi,r=mj,o=t&&!t.nodeType&&t,i=o&&!0&&e&&!e.nodeType&&e,a=i&&i.exports===o,l=a?n.Buffer:void 0,u=l?l.isBuffer:void 0,p=u||r;e.exports=p})(yf,yf.exports);var _m=yf.exports,vj=9007199254740991,yj=/^(?:0|[1-9]\d*)$/;function bj(e,t){var n=typeof e;return t=t??vj,!!t&&(n=="number"||n!="symbol"&&yj.test(e))&&e>-1&&e%1==0&&e<t}var OT=bj,_j=9007199254740991;function xj(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=_j}var xm=xj,Ej=As,Cj=xm,wj=ta,Nj="[object Arguments]",Tj="[object Array]",Sj="[object Boolean]",Oj="[object Date]",Aj="[object Error]",Rj="[object Function]",$j="[object Map]",Dj="[object Number]",Mj="[object Object]",kj="[object RegExp]",Pj="[object Set]",Ij="[object String]",Lj="[object WeakMap]",Fj="[object ArrayBuffer]",jj="[object DataView]",Bj="[object Float32Array]",Hj="[object Float64Array]",Wj="[object Int8Array]",zj="[object Int16Array]",Kj="[object Int32Array]",Gj="[object Uint8Array]",Uj="[object Uint8ClampedArray]",Vj="[object Uint16Array]",Yj="[object Uint32Array]",Tn={};Tn[Bj]=Tn[Hj]=Tn[Wj]=Tn[zj]=Tn[Kj]=Tn[Gj]=Tn[Uj]=Tn[Vj]=Tn[Yj]=!0;Tn[Nj]=Tn[Tj]=Tn[Fj]=Tn[Sj]=Tn[jj]=Tn[Oj]=Tn[Aj]=Tn[Rj]=Tn[$j]=Tn[Dj]=Tn[Mj]=Tn[kj]=Tn[Pj]=Tn[Ij]=Tn[Lj]=!1;function qj(e){return wj(e)&&Cj(e.length)&&!!Tn[Ej(e)]}var Zj=qj;function Jj(e){return function(t){return e(t)}}var Em=Jj,bf={exports:{}};bf.exports;(function(e,t){var n=wT,r=t&&!t.nodeType&&t,o=r&&!0&&e&&!e.nodeType&&e,i=o&&o.exports===r,a=i&&n.process,l=function(){try{var u=o&&o.require&&o.require("util").types;return u||a&&a.binding&&a.binding("util")}catch{}}();e.exports=l})(bf,bf.exports);var Cm=bf.exports,Xj=Zj,Qj=Em,Jb=Cm,Xb=Jb&&Jb.isTypedArray,eB=Xb?Qj(Xb):Xj,AT=eB,tB=ij,nB=ST,rB=Yo,oB=_m,iB=OT,aB=AT,sB=Object.prototype,lB=sB.hasOwnProperty;function cB(e,t){var n=rB(e),r=!n&&nB(e),o=!n&&!r&&oB(e),i=!n&&!r&&!o&&aB(e),a=n||r||o||i,l=a?tB(e.length,String):[],u=l.length;for(var p in e)(t||lB.call(e,p))&&!(a&&(p=="length"||o&&(p=="offset"||p=="parent")||i&&(p=="buffer"||p=="byteLength"||p=="byteOffset")||iB(p,u)))&&l.push(p);return l}var RT=cB,uB=Object.prototype;function dB(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||uB;return e===n}var wm=dB;function fB(e,t){return function(n){return e(t(n))}}var $T=fB,hB=$T,pB=hB(Object.keys,Object),gB=pB,mB=wm,vB=gB,yB=Object.prototype,bB=yB.hasOwnProperty;function _B(e){if(!mB(e))return vB(e);var t=[];for(var n in Object(e))bB.call(e,n)&&n!="constructor"&&t.push(n);return t}var xB=_B;function EB(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var ac=EB,CB=As,wB=ac,NB="[object AsyncFunction]",TB="[object Function]",SB="[object GeneratorFunction]",OB="[object Proxy]";function AB(e){if(!wB(e))return!1;var t=CB(e);return t==TB||t==SB||t==NB||t==OB}var DT=AB,RB=DT,$B=xm;function DB(e){return e!=null&&$B(e.length)&&!RB(e)}var Kf=DB,MB=RT,kB=xB,PB=Kf;function IB(e){return PB(e)?MB(e):kB(e)}var Gu=IB,LB=rj,FB=Gu;function jB(e,t){return e&&LB(e,t,FB)}var MT=jB;function BB(e){return e}var kT=BB,HB=kT;function WB(e){return typeof e=="function"?e:HB}var zB=WB,KB=MT,GB=zB;function UB(e,t){return e&&KB(e,GB(t))}var Nm=UB,VB=$T,YB=VB(Object.getPrototypeOf,Object),Tm=YB,qB=As,ZB=Tm,JB=ta,XB="[object Object]",QB=Function.prototype,eH=Object.prototype,PT=QB.toString,tH=eH.hasOwnProperty,nH=PT.call(Object);function rH(e){if(!JB(e)||qB(e)!=XB)return!1;var t=ZB(e);if(t===null)return!0;var n=tH.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&PT.call(n)==nH}var oH=rH;function iH(e,t){for(var n=-1,r=e==null?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}var IT=iH;function aH(){this.__data__=[],this.size=0}var sH=aH;function lH(e,t){return e===t||e!==e&&t!==t}var Sm=lH,cH=Sm;function uH(e,t){for(var n=e.length;n--;)if(cH(e[n][0],t))return n;return-1}var Gf=uH,dH=Gf,fH=Array.prototype,hH=fH.splice;function pH(e){var t=this.__data__,n=dH(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():hH.call(t,n,1),--this.size,!0}var gH=pH,mH=Gf;function vH(e){var t=this.__data__,n=mH(t,e);return n<0?void 0:t[n][1]}var yH=vH,bH=Gf;function _H(e){return bH(this.__data__,e)>-1}var xH=_H,EH=Gf;function CH(e,t){var n=this.__data__,r=EH(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var wH=CH,NH=sH,TH=gH,SH=yH,OH=xH,AH=wH;function sc(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}sc.prototype.clear=NH;sc.prototype.delete=TH;sc.prototype.get=SH;sc.prototype.has=OH;sc.prototype.set=AH;var Uf=sc,RH=Uf;function $H(){this.__data__=new RH,this.size=0}var DH=$H;function MH(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}var kH=MH;function PH(e){return this.__data__.get(e)}var IH=PH;function LH(e){return this.__data__.has(e)}var FH=LH,jH=wi,BH=jH["__core-js_shared__"],HH=BH,pp=HH,Qb=function(){var e=/[^.]+$/.exec(pp&&pp.keys&&pp.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function WH(e){return!!Qb&&Qb in e}var zH=WH,KH=Function.prototype,GH=KH.toString;function UH(e){if(e!=null){try{return GH.call(e)}catch{}try{return e+""}catch{}}return""}var LT=UH,VH=DT,YH=zH,qH=ac,ZH=LT,JH=/[\\^$.*+?()[\]{}|]/g,XH=/^\[object .+?Constructor\]$/,QH=Function.prototype,e3=Object.prototype,t3=QH.toString,n3=e3.hasOwnProperty,r3=RegExp("^"+t3.call(n3).replace(JH,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function o3(e){if(!qH(e)||YH(e))return!1;var t=VH(e)?r3:XH;return t.test(ZH(e))}var i3=o3;function a3(e,t){return e==null?void 0:e[t]}var s3=a3,l3=i3,c3=s3;function u3(e,t){var n=c3(e,t);return l3(n)?n:void 0}var Rs=u3,d3=Rs,f3=wi,h3=d3(f3,"Map"),Om=h3,p3=Rs,g3=p3(Object,"create"),Vf=g3,e_=Vf;function m3(){this.__data__=e_?e_(null):{},this.size=0}var v3=m3;function y3(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var b3=y3,_3=Vf,x3="__lodash_hash_undefined__",E3=Object.prototype,C3=E3.hasOwnProperty;function w3(e){var t=this.__data__;if(_3){var n=t[e];return n===x3?void 0:n}return C3.call(t,e)?t[e]:void 0}var N3=w3,T3=Vf,S3=Object.prototype,O3=S3.hasOwnProperty;function A3(e){var t=this.__data__;return T3?t[e]!==void 0:O3.call(t,e)}var R3=A3,$3=Vf,D3="__lodash_hash_undefined__";function M3(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=$3&&t===void 0?D3:t,this}var k3=M3,P3=v3,I3=b3,L3=N3,F3=R3,j3=k3;function lc(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}lc.prototype.clear=P3;lc.prototype.delete=I3;lc.prototype.get=L3;lc.prototype.has=F3;lc.prototype.set=j3;var B3=lc,t_=B3,H3=Uf,W3=Om;function z3(){this.size=0,this.__data__={hash:new t_,map:new(W3||H3),string:new t_}}var K3=z3;function G3(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var U3=G3,V3=U3;function Y3(e,t){var n=e.__data__;return V3(t)?n[typeof t=="string"?"string":"hash"]:n.map}var Yf=Y3,q3=Yf;function Z3(e){var t=q3(this,e).delete(e);return this.size-=t?1:0,t}var J3=Z3,X3=Yf;function Q3(e){return X3(this,e).get(e)}var e5=Q3,t5=Yf;function n5(e){return t5(this,e).has(e)}var r5=n5,o5=Yf;function i5(e,t){var n=o5(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}var a5=i5,s5=K3,l5=J3,c5=e5,u5=r5,d5=a5;function cc(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}cc.prototype.clear=s5;cc.prototype.delete=l5;cc.prototype.get=c5;cc.prototype.has=u5;cc.prototype.set=d5;var Am=cc,f5=Uf,h5=Om,p5=Am,g5=200;function m5(e,t){var n=this.__data__;if(n instanceof f5){var r=n.__data__;if(!h5||r.length<g5-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new p5(r)}return n.set(e,t),this.size=n.size,this}var v5=m5,y5=Uf,b5=DH,_5=kH,x5=IH,E5=FH,C5=v5;function uc(e){var t=this.__data__=new y5(e);this.size=t.size}uc.prototype.clear=b5;uc.prototype.delete=_5;uc.prototype.get=x5;uc.prototype.has=E5;uc.prototype.set=C5;var Rm=uc,w5="__lodash_hash_undefined__";function N5(e){return this.__data__.set(e,w5),this}var T5=N5;function S5(e){return this.__data__.has(e)}var O5=S5,A5=Am,R5=T5,$5=O5;function _f(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new A5;++t<n;)this.add(e[t])}_f.prototype.add=_f.prototype.push=R5;_f.prototype.has=$5;var D5=_f;function M5(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var k5=M5;function P5(e,t){return e.has(t)}var I5=P5,L5=D5,F5=k5,j5=I5,B5=1,H5=2;function W5(e,t,n,r,o,i){var a=n&B5,l=e.length,u=t.length;if(l!=u&&!(a&&u>l))return!1;var p=i.get(e),m=i.get(t);if(p&&m)return p==t&&m==e;var _=-1,v=!0,C=n&H5?new L5:void 0;for(i.set(e,t),i.set(t,e);++_<l;){var b=e[_],y=t[_];if(r)var N=a?r(y,b,_,t,e,i):r(b,y,_,e,t,i);if(N!==void 0){if(N)continue;v=!1;break}if(C){if(!F5(t,function(R,O){if(!j5(C,O)&&(b===R||o(b,R,n,r,i)))return C.push(O)})){v=!1;break}}else if(!(b===y||o(b,y,n,r,i))){v=!1;break}}return i.delete(e),i.delete(t),v}var FT=W5,z5=wi,K5=z5.Uint8Array,jT=K5;function G5(e){var t=-1,n=Array(e.size);return e.forEach(function(r,o){n[++t]=[o,r]}),n}var U5=G5;function V5(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var Y5=V5,n_=Ku,r_=jT,q5=Sm,Z5=FT,J5=U5,X5=Y5,Q5=1,eW=2,tW="[object Boolean]",nW="[object Date]",rW="[object Error]",oW="[object Map]",iW="[object Number]",aW="[object RegExp]",sW="[object Set]",lW="[object String]",cW="[object Symbol]",uW="[object ArrayBuffer]",dW="[object DataView]",o_=n_?n_.prototype:void 0,gp=o_?o_.valueOf:void 0;function fW(e,t,n,r,o,i,a){switch(n){case dW:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case uW:return!(e.byteLength!=t.byteLength||!i(new r_(e),new r_(t)));case tW:case nW:case iW:return q5(+e,+t);case rW:return e.name==t.name&&e.message==t.message;case aW:case lW:return e==t+"";case oW:var l=J5;case sW:var u=r&Q5;if(l||(l=X5),e.size!=t.size&&!u)return!1;var p=a.get(e);if(p)return p==t;r|=eW,a.set(e,t);var m=Z5(l(e),l(t),r,o,i,a);return a.delete(e),m;case cW:if(gp)return gp.call(e)==gp.call(t)}return!1}var hW=fW;function pW(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}var BT=pW,gW=BT,mW=Yo;function vW(e,t,n){var r=t(e);return mW(e)?r:gW(r,n(e))}var HT=vW;function yW(e,t){for(var n=-1,r=e==null?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a,n,e)&&(i[o++]=a)}return i}var bW=yW;function _W(){return[]}var WT=_W,xW=bW,EW=WT,CW=Object.prototype,wW=CW.propertyIsEnumerable,i_=Object.getOwnPropertySymbols,NW=i_?function(e){return e==null?[]:(e=Object(e),xW(i_(e),function(t){return wW.call(e,t)}))}:EW,$m=NW,TW=HT,SW=$m,OW=Gu;function AW(e){return TW(e,OW,SW)}var zT=AW,a_=zT,RW=1,$W=Object.prototype,DW=$W.hasOwnProperty;function MW(e,t,n,r,o,i){var a=n&RW,l=a_(e),u=l.length,p=a_(t),m=p.length;if(u!=m&&!a)return!1;for(var _=u;_--;){var v=l[_];if(!(a?v in t:DW.call(t,v)))return!1}var C=i.get(e),b=i.get(t);if(C&&b)return C==t&&b==e;var y=!0;i.set(e,t),i.set(t,e);for(var N=a;++_<u;){v=l[_];var R=e[v],O=t[v];if(r)var k=a?r(O,R,v,t,e,i):r(R,O,v,e,t,i);if(!(k===void 0?R===O||o(R,O,n,r,i):k)){y=!1;break}N||(N=v=="constructor")}if(y&&!N){var I=e.constructor,M=t.constructor;I!=M&&"constructor"in e&&"constructor"in t&&!(typeof I=="function"&&I instanceof I&&typeof M=="function"&&M instanceof M)&&(y=!1)}return i.delete(e),i.delete(t),y}var kW=MW,PW=Rs,IW=wi,LW=PW(IW,"DataView"),FW=LW,jW=Rs,BW=wi,HW=jW(BW,"Promise"),WW=HW,zW=Rs,KW=wi,GW=zW(KW,"Set"),UW=GW,VW=Rs,YW=wi,qW=VW(YW,"WeakMap"),ZW=qW,dg=FW,fg=Om,hg=WW,pg=UW,gg=ZW,KT=As,dc=LT,s_="[object Map]",JW="[object Object]",l_="[object Promise]",c_="[object Set]",u_="[object WeakMap]",d_="[object DataView]",XW=dc(dg),QW=dc(fg),ez=dc(hg),tz=dc(pg),nz=dc(gg),vs=KT;(dg&&vs(new dg(new ArrayBuffer(1)))!=d_||fg&&vs(new fg)!=s_||hg&&vs(hg.resolve())!=l_||pg&&vs(new pg)!=c_||gg&&vs(new gg)!=u_)&&(vs=function(e){var t=KT(e),n=t==JW?e.constructor:void 0,r=n?dc(n):"";if(r)switch(r){case XW:return d_;case QW:return s_;case ez:return l_;case tz:return c_;case nz:return u_}return t});var qf=vs,mp=Rm,rz=FT,oz=hW,iz=kW,f_=qf,h_=Yo,p_=_m,az=AT,sz=1,g_="[object Arguments]",m_="[object Array]",Ud="[object Object]",lz=Object.prototype,v_=lz.hasOwnProperty;function cz(e,t,n,r,o,i){var a=h_(e),l=h_(t),u=a?m_:f_(e),p=l?m_:f_(t);u=u==g_?Ud:u,p=p==g_?Ud:p;var m=u==Ud,_=p==Ud,v=u==p;if(v&&p_(e)){if(!p_(t))return!1;a=!0,m=!1}if(v&&!m)return i||(i=new mp),a||az(e)?rz(e,t,n,r,o,i):oz(e,t,u,n,r,o,i);if(!(n&sz)){var C=m&&v_.call(e,"__wrapped__"),b=_&&v_.call(t,"__wrapped__");if(C||b){var y=C?e.value():e,N=b?t.value():t;return i||(i=new mp),o(y,N,n,r,i)}}return v?(i||(i=new mp),iz(e,t,n,r,o,i)):!1}var uz=cz,dz=uz,y_=ta;function GT(e,t,n,r,o){return e===t?!0:e==null||t==null||!y_(e)&&!y_(t)?e!==e&&t!==t:dz(e,t,n,r,GT,o)}var UT=GT,fz=Rm,hz=UT,pz=1,gz=2;function mz(e,t,n,r){var o=n.length,i=o,a=!r;if(e==null)return!i;for(e=Object(e);o--;){var l=n[o];if(a&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++o<i;){l=n[o];var u=l[0],p=e[u],m=l[1];if(a&&l[2]){if(p===void 0&&!(u in e))return!1}else{var _=new fz;if(r)var v=r(p,m,u,e,t,_);if(!(v===void 0?hz(m,p,pz|gz,r,_):v))return!1}}return!0}var vz=mz,yz=ac;function bz(e){return e===e&&!yz(e)}var VT=bz,_z=VT,xz=Gu;function Ez(e){for(var t=xz(e),n=t.length;n--;){var r=t[n],o=e[r];t[n]=[r,o,_z(o)]}return t}var Cz=Ez;function wz(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}var YT=wz,Nz=vz,Tz=Cz,Sz=YT;function Oz(e){var t=Tz(e);return t.length==1&&t[0][2]?Sz(t[0][0],t[0][1]):function(n){return n===e||Nz(n,e,t)}}var Az=Oz,Rz=As,$z=ta,Dz="[object Symbol]";function Mz(e){return typeof e=="symbol"||$z(e)&&Rz(e)==Dz}var Dm=Mz,kz=Yo,Pz=Dm,Iz=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Lz=/^\w*$/;function Fz(e,t){if(kz(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||Pz(e)?!0:Lz.test(e)||!Iz.test(e)||t!=null&&e in Object(t)}var Mm=Fz,qT=Am,jz="Expected a function";function km(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(jz);var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=e.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(km.Cache||qT),n}km.Cache=qT;var Bz=km,Hz=Bz,Wz=500;function zz(e){var t=Hz(e,function(r){return n.size===Wz&&n.clear(),r}),n=t.cache;return t}var Kz=zz,Gz=Kz,Uz=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Vz=/\\(\\)?/g,Yz=Gz(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(Uz,function(n,r,o,i){t.push(o?i.replace(Vz,"$1"):r||n)}),t}),qz=Yz,b_=Ku,Zz=IT,Jz=Yo,Xz=Dm,Qz=1/0,__=b_?b_.prototype:void 0,x_=__?__.toString:void 0;function ZT(e){if(typeof e=="string")return e;if(Jz(e))return Zz(e,ZT)+"";if(Xz(e))return x_?x_.call(e):"";var t=e+"";return t=="0"&&1/e==-Qz?"-0":t}var e4=ZT,t4=e4;function n4(e){return e==null?"":t4(e)}var r4=n4,o4=Yo,i4=Mm,a4=qz,s4=r4;function l4(e,t){return o4(e)?e:i4(e,t)?[e]:a4(s4(e))}var JT=l4,c4=Dm,u4=1/0;function d4(e){if(typeof e=="string"||c4(e))return e;var t=e+"";return t=="0"&&1/e==-u4?"-0":t}var Zf=d4,f4=JT,h4=Zf;function p4(e,t){t=f4(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[h4(t[n++])];return n&&n==r?e:void 0}var XT=p4,g4=XT;function m4(e,t,n){var r=e==null?void 0:g4(e,t);return r===void 0?n:r}var v4=m4;function y4(e,t){return e!=null&&t in Object(e)}var b4=y4,_4=JT,x4=ST,E4=Yo,C4=OT,w4=xm,N4=Zf;function T4(e,t,n){t=_4(t,e);for(var r=-1,o=t.length,i=!1;++r<o;){var a=N4(t[r]);if(!(i=e!=null&&n(e,a)))break;e=e[a]}return i||++r!=o?i:(o=e==null?0:e.length,!!o&&w4(o)&&C4(a,o)&&(E4(e)||x4(e)))}var S4=T4,O4=b4,A4=S4;function R4(e,t){return e!=null&&A4(e,t,O4)}var $4=R4,D4=UT,M4=v4,k4=$4,P4=Mm,I4=VT,L4=YT,F4=Zf,j4=1,B4=2;function H4(e,t){return P4(e)&&I4(t)?L4(F4(e),t):function(n){var r=M4(n,e);return r===void 0&&r===t?k4(n,e):D4(t,r,j4|B4)}}var W4=H4;function z4(e){return function(t){return t==null?void 0:t[e]}}var K4=z4,G4=XT;function U4(e){return function(t){return G4(t,e)}}var V4=U4,Y4=K4,q4=V4,Z4=Mm,J4=Zf;function X4(e){return Z4(e)?Y4(J4(e)):q4(e)}var Q4=X4,e6=Az,t6=W4,n6=kT,r6=Yo,o6=Q4;function i6(e){return typeof e=="function"?e:e==null?n6:typeof e=="object"?r6(e)?t6(e[0],e[1]):e6(e):o6(e)}var a6=i6,s6=Kf;function l6(e,t){return function(n,r){if(n==null)return n;if(!s6(n))return e(n,r);for(var o=n.length,i=t?o:-1,a=Object(n);(t?i--:++i<o)&&r(a[i],i,a)!==!1;);return n}}var c6=l6,u6=MT,d6=c6,f6=d6(u6),h6=f6,p6=h6,g6=Kf;function m6(e,t){var n=-1,r=g6(e)?Array(e.length):[];return p6(e,function(o,i,a){r[++n]=t(o,i,a)}),r}var v6=m6,y6=IT,b6=a6,_6=v6,x6=Yo;function E6(e,t){var n=x6(e)?y6:_6;return n(e,b6(t))}var C6=E6;Object.defineProperty(zu,"__esModule",{value:!0});zu.flattenNames=void 0;var w6=X2,N6=Jf(w6),T6=Nm,S6=Jf(T6),O6=oH,A6=Jf(O6),R6=C6,$6=Jf(R6);function Jf(e){return e&&e.__esModule?e:{default:e}}var D6=zu.flattenNames=function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=[];return(0,$6.default)(t,function(r){Array.isArray(r)?e(r).map(function(o){return n.push(o)}):(0,A6.default)(r)?(0,S6.default)(r,function(o,i){o===!0&&n.push(i),n.push(i+"-"+o)}):(0,N6.default)(r)&&n.push(r)}),n};zu.default=D6;var Uu={};function M6(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}var k6=M6,P6=Rs,I6=function(){try{var e=P6(Object,"defineProperty");return e({},"",{}),e}catch{}}(),L6=I6,E_=L6;function F6(e,t,n){t=="__proto__"&&E_?E_(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var QT=F6,j6=QT,B6=Sm,H6=Object.prototype,W6=H6.hasOwnProperty;function z6(e,t,n){var r=e[t];(!(W6.call(e,t)&&B6(r,n))||n===void 0&&!(t in e))&&j6(e,t,n)}var eS=z6,K6=eS,G6=QT;function U6(e,t,n,r){var o=!n;n||(n={});for(var i=-1,a=t.length;++i<a;){var l=t[i],u=r?r(n[l],e[l],l,n,e):void 0;u===void 0&&(u=e[l]),o?G6(n,l,u):K6(n,l,u)}return n}var Xf=U6,V6=Xf,Y6=Gu;function q6(e,t){return e&&V6(t,Y6(t),e)}var Z6=q6;function J6(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var X6=J6,Q6=ac,eK=wm,tK=X6,nK=Object.prototype,rK=nK.hasOwnProperty;function oK(e){if(!Q6(e))return tK(e);var t=eK(e),n=[];for(var r in e)r=="constructor"&&(t||!rK.call(e,r))||n.push(r);return n}var iK=oK,aK=RT,sK=iK,lK=Kf;function cK(e){return lK(e)?aK(e,!0):sK(e)}var Pm=cK,uK=Xf,dK=Pm;function fK(e,t){return e&&uK(t,dK(t),e)}var hK=fK,xf={exports:{}};xf.exports;(function(e,t){var n=wi,r=t&&!t.nodeType&&t,o=r&&!0&&e&&!e.nodeType&&e,i=o&&o.exports===r,a=i?n.Buffer:void 0,l=a?a.allocUnsafe:void 0;function u(p,m){if(m)return p.slice();var _=p.length,v=l?l(_):new p.constructor(_);return p.copy(v),v}e.exports=u})(xf,xf.exports);var pK=xf.exports;function gK(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}var mK=gK,vK=Xf,yK=$m;function bK(e,t){return vK(e,yK(e),t)}var _K=bK,xK=BT,EK=Tm,CK=$m,wK=WT,NK=Object.getOwnPropertySymbols,TK=NK?function(e){for(var t=[];e;)xK(t,CK(e)),e=EK(e);return t}:wK,tS=TK,SK=Xf,OK=tS;function AK(e,t){return SK(e,OK(e),t)}var RK=AK,$K=HT,DK=tS,MK=Pm;function kK(e){return $K(e,MK,DK)}var PK=kK,IK=Object.prototype,LK=IK.hasOwnProperty;function FK(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&LK.call(e,"index")&&(n.index=e.index,n.input=e.input),n}var jK=FK,C_=jT;function BK(e){var t=new e.constructor(e.byteLength);return new C_(t).set(new C_(e)),t}var Im=BK,HK=Im;function WK(e,t){var n=t?HK(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var zK=WK,KK=/\w*$/;function GK(e){var t=new e.constructor(e.source,KK.exec(e));return t.lastIndex=e.lastIndex,t}var UK=GK,w_=Ku,N_=w_?w_.prototype:void 0,T_=N_?N_.valueOf:void 0;function VK(e){return T_?Object(T_.call(e)):{}}var YK=VK,qK=Im;function ZK(e,t){var n=t?qK(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var JK=ZK,XK=Im,QK=zK,eG=UK,tG=YK,nG=JK,rG="[object Boolean]",oG="[object Date]",iG="[object Map]",aG="[object Number]",sG="[object RegExp]",lG="[object Set]",cG="[object String]",uG="[object Symbol]",dG="[object ArrayBuffer]",fG="[object DataView]",hG="[object Float32Array]",pG="[object Float64Array]",gG="[object Int8Array]",mG="[object Int16Array]",vG="[object Int32Array]",yG="[object Uint8Array]",bG="[object Uint8ClampedArray]",_G="[object Uint16Array]",xG="[object Uint32Array]";function EG(e,t,n){var r=e.constructor;switch(t){case dG:return XK(e);case rG:case oG:return new r(+e);case fG:return QK(e,n);case hG:case pG:case gG:case mG:case vG:case yG:case bG:case _G:case xG:return nG(e,n);case iG:return new r;case aG:case cG:return new r(e);case sG:return eG(e);case lG:return new r;case uG:return tG(e)}}var CG=EG,wG=ac,S_=Object.create,NG=function(){function e(){}return function(t){if(!wG(t))return{};if(S_)return S_(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}(),TG=NG,SG=TG,OG=Tm,AG=wm;function RG(e){return typeof e.constructor=="function"&&!AG(e)?SG(OG(e)):{}}var $G=RG,DG=qf,MG=ta,kG="[object Map]";function PG(e){return MG(e)&&DG(e)==kG}var IG=PG,LG=IG,FG=Em,O_=Cm,A_=O_&&O_.isMap,jG=A_?FG(A_):LG,BG=jG,HG=qf,WG=ta,zG="[object Set]";function KG(e){return WG(e)&&HG(e)==zG}var GG=KG,UG=GG,VG=Em,R_=Cm,$_=R_&&R_.isSet,YG=$_?VG($_):UG,qG=YG,ZG=Rm,JG=k6,XG=eS,QG=Z6,eU=hK,tU=pK,nU=mK,rU=_K,oU=RK,iU=zT,aU=PK,sU=qf,lU=jK,cU=CG,uU=$G,dU=Yo,fU=_m,hU=BG,pU=ac,gU=qG,mU=Gu,vU=Pm,yU=1,bU=2,_U=4,nS="[object Arguments]",xU="[object Array]",EU="[object Boolean]",CU="[object Date]",wU="[object Error]",rS="[object Function]",NU="[object GeneratorFunction]",TU="[object Map]",SU="[object Number]",oS="[object Object]",OU="[object RegExp]",AU="[object Set]",RU="[object String]",$U="[object Symbol]",DU="[object WeakMap]",MU="[object ArrayBuffer]",kU="[object DataView]",PU="[object Float32Array]",IU="[object Float64Array]",LU="[object Int8Array]",FU="[object Int16Array]",jU="[object Int32Array]",BU="[object Uint8Array]",HU="[object Uint8ClampedArray]",WU="[object Uint16Array]",zU="[object Uint32Array]",En={};En[nS]=En[xU]=En[MU]=En[kU]=En[EU]=En[CU]=En[PU]=En[IU]=En[LU]=En[FU]=En[jU]=En[TU]=En[SU]=En[oS]=En[OU]=En[AU]=En[RU]=En[$U]=En[BU]=En[HU]=En[WU]=En[zU]=!0;En[wU]=En[rS]=En[DU]=!1;function of(e,t,n,r,o,i){var a,l=t&yU,u=t&bU,p=t&_U;if(n&&(a=o?n(e,r,o,i):n(e)),a!==void 0)return a;if(!pU(e))return e;var m=dU(e);if(m){if(a=lU(e),!l)return nU(e,a)}else{var _=sU(e),v=_==rS||_==NU;if(fU(e))return tU(e,l);if(_==oS||_==nS||v&&!o){if(a=u||v?{}:uU(e),!l)return u?oU(e,eU(a,e)):rU(e,QG(a,e))}else{if(!En[_])return o?e:{};a=cU(e,_,l)}}i||(i=new ZG);var C=i.get(e);if(C)return C;i.set(e,a),gU(e)?e.forEach(function(N){a.add(of(N,t,n,N,e,i))}):hU(e)&&e.forEach(function(N,R){a.set(R,of(N,t,n,R,e,i))});var b=p?u?aU:iU:u?vU:mU,y=m?void 0:b(e);return JG(y||e,function(N,R){y&&(R=N,N=e[R]),XG(a,R,of(N,t,n,R,e,i))}),a}var KU=of,GU=KU,UU=1,VU=4;function YU(e){return GU(e,UU|VU)}var qU=YU;Object.defineProperty(Uu,"__esModule",{value:!0});Uu.mergeClasses=void 0;var ZU=Nm,JU=iS(ZU),XU=qU,QU=iS(XU),e8=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};function iS(e){return e&&e.__esModule?e:{default:e}}var t8=Uu.mergeClasses=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],r=t.default&&(0,QU.default)(t.default)||{};return n.map(function(o){var i=t[o];return i&&(0,JU.default)(i,function(a,l){r[l]||(r[l]={}),r[l]=e8({},r[l],i[l])}),o}),r};Uu.default=t8;var Vu={};Object.defineProperty(Vu,"__esModule",{value:!0});Vu.autoprefix=void 0;var n8=Nm,D_=o8(n8),r8=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};function o8(e){return e&&e.__esModule?e:{default:e}}var i8={borderRadius:function(t){return{msBorderRadius:t,MozBorderRadius:t,OBorderRadius:t,WebkitBorderRadius:t,borderRadius:t}},boxShadow:function(t){return{msBoxShadow:t,MozBoxShadow:t,OBoxShadow:t,WebkitBoxShadow:t,boxShadow:t}},userSelect:function(t){return{WebkitTouchCallout:t,KhtmlUserSelect:t,MozUserSelect:t,msUserSelect:t,WebkitUserSelect:t,userSelect:t}},flex:function(t){return{WebkitBoxFlex:t,MozBoxFlex:t,WebkitFlex:t,msFlex:t,flex:t}},flexBasis:function(t){return{WebkitFlexBasis:t,flexBasis:t}},justifyContent:function(t){return{WebkitJustifyContent:t,justifyContent:t}},transition:function(t){return{msTransition:t,MozTransition:t,OTransition:t,WebkitTransition:t,transition:t}},transform:function(t){return{msTransform:t,MozTransform:t,OTransform:t,WebkitTransform:t,transform:t}},absolute:function(t){var n=t&&t.split(" ");return{position:"absolute",top:n&&n[0],right:n&&n[1],bottom:n&&n[2],left:n&&n[3]}},extend:function(t,n){var r=n[t];return r||{extend:t}}},a8=Vu.autoprefix=function(t){var n={};return(0,D_.default)(t,function(r,o){var i={};(0,D_.default)(r,function(a,l){var u=i8[l];u?i=r8({},i,u(a)):i[l]=a}),n[o]=i}),n};Vu.default=a8;var Yu={};Object.defineProperty(Yu,"__esModule",{value:!0});Yu.hover=void 0;var s8=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},l8=z,vp=c8(l8);function c8(e){return e&&e.__esModule?e:{default:e}}function u8(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function M_(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function d8(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var f8=Yu.hover=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"span";return function(r){d8(o,r);function o(){var i,a,l,u;u8(this,o);for(var p=arguments.length,m=Array(p),_=0;_<p;_++)m[_]=arguments[_];return u=(a=(l=M_(this,(i=o.__proto__||Object.getPrototypeOf(o)).call.apply(i,[this].concat(m))),l),l.state={hover:!1},l.handleMouseOver=function(){return l.setState({hover:!0})},l.handleMouseOut=function(){return l.setState({hover:!1})},l.render=function(){return vp.default.createElement(n,{onMouseOver:l.handleMouseOver,onMouseOut:l.handleMouseOut},vp.default.createElement(t,s8({},l.props,l.state)))},a),M_(l,u)}return o}(vp.default.Component)};Yu.default=f8;var qu={};Object.defineProperty(qu,"__esModule",{value:!0});qu.active=void 0;var h8=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},p8=z,yp=g8(p8);function g8(e){return e&&e.__esModule?e:{default:e}}function m8(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function k_(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function v8(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var y8=qu.active=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"span";return function(r){v8(o,r);function o(){var i,a,l,u;m8(this,o);for(var p=arguments.length,m=Array(p),_=0;_<p;_++)m[_]=arguments[_];return u=(a=(l=k_(this,(i=o.__proto__||Object.getPrototypeOf(o)).call.apply(i,[this].concat(m))),l),l.state={active:!1},l.handleMouseDown=function(){return l.setState({active:!0})},l.handleMouseUp=function(){return l.setState({active:!1})},l.render=function(){return yp.default.createElement(n,{onMouseDown:l.handleMouseDown,onMouseUp:l.handleMouseUp},yp.default.createElement(t,h8({},l.props,l.state)))},a),k_(l,u)}return o}(yp.default.Component)};qu.default=y8;var Lm={};Object.defineProperty(Lm,"__esModule",{value:!0});var b8=function(t,n){var r={},o=function(a){var l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;r[a]=l};return t===0&&o("first-child"),t===n-1&&o("last-child"),(t===0||t%2===0)&&o("even"),Math.abs(t%2)===1&&o("odd"),o("nth-child",t),r};Lm.default=b8;Object.defineProperty(vo,"__esModule",{value:!0});vo.ReactCSS=vo.loop=vo.handleActive=Fm=vo.handleHover=vo.hover=void 0;var _8=zu,x8=fc(_8),E8=Uu,C8=fc(E8),w8=Vu,N8=fc(w8),T8=Yu,aS=fc(T8),S8=qu,O8=fc(S8),A8=Lm,R8=fc(A8);function fc(e){return e&&e.__esModule?e:{default:e}}vo.hover=aS.default;var Fm=vo.handleHover=aS.default;vo.handleActive=O8.default;vo.loop=R8.default;var $8=vo.ReactCSS=function(t){for(var n=arguments.length,r=Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];var i=(0,x8.default)(r),a=(0,C8.default)(t,i);return(0,N8.default)(a)},jt=vo.default=$8,D8=function(t,n,r,o,i){var a=i.clientWidth,l=i.clientHeight,u=typeof t.pageX=="number"?t.pageX:t.touches[0].pageX,p=typeof t.pageY=="number"?t.pageY:t.touches[0].pageY,m=u-(i.getBoundingClientRect().left+window.pageXOffset),_=p-(i.getBoundingClientRect().top+window.pageYOffset);if(r==="vertical"){var v=void 0;if(_<0?v=0:_>l?v=1:v=Math.round(_*100/l)/100,n.a!==v)return{h:n.h,s:n.s,l:n.l,a:v,source:"rgb"}}else{var C=void 0;if(m<0?C=0:m>a?C=1:C=Math.round(m*100/a)/100,o!==C)return{h:n.h,s:n.s,l:n.l,a:C,source:"rgb"}}return null},bp={},M8=function(t,n,r,o){if(typeof document>"u"&&!o)return null;var i=o?new o:document.createElement("canvas");i.width=r*2,i.height=r*2;var a=i.getContext("2d");return a?(a.fillStyle=t,a.fillRect(0,0,i.width,i.height),a.fillStyle=n,a.fillRect(0,0,r,r),a.translate(r,r),a.fillRect(0,0,r,r),i.toDataURL()):null},k8=function(t,n,r,o){var i=t+"-"+n+"-"+r+(o?"-server":"");if(bp[i])return bp[i];var a=M8(t,n,r,o);return bp[i]=a,a},P_=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},hc=function(t){var n=t.white,r=t.grey,o=t.size,i=t.renderers,a=t.borderRadius,l=t.boxShadow,u=t.children,p=jt({default:{grid:{borderRadius:a,boxShadow:l,absolute:"0px 0px 0px 0px",background:"url("+k8(n,r,o,i.canvas)+") center left"}}});return z.isValidElement(u)?z.cloneElement(u,P_({},u.props,{style:P_({},u.props.style,p.grid)})):z.createElement("div",{style:p.grid})};hc.defaultProps={size:8,white:"transparent",grey:"rgba(0,0,0,.08)",renderers:{}};var P8=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},I8=function(){function e(t,n){for(var r=0;r<n.length;r++){var o=n[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function L8(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function I_(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function F8(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var jm=function(e){F8(t,e);function t(){var n,r,o,i;L8(this,t);for(var a=arguments.length,l=Array(a),u=0;u<a;u++)l[u]=arguments[u];return i=(r=(o=I_(this,(n=t.__proto__||Object.getPrototypeOf(t)).call.apply(n,[this].concat(l))),o),o.handleChange=function(p){var m=D8(p,o.props.hsl,o.props.direction,o.props.a,o.container);m&&typeof o.props.onChange=="function"&&o.props.onChange(m,p)},o.handleMouseDown=function(p){o.handleChange(p),window.addEventListener("mousemove",o.handleChange),window.addEventListener("mouseup",o.handleMouseUp)},o.handleMouseUp=function(){o.unbindEventListeners()},o.unbindEventListeners=function(){window.removeEventListener("mousemove",o.handleChange),window.removeEventListener("mouseup",o.handleMouseUp)},r),I_(o,i)}return I8(t,[{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"render",value:function(){var r=this,o=this.props.rgb,i=jt({default:{alpha:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius},checkboard:{absolute:"0px 0px 0px 0px",overflow:"hidden",borderRadius:this.props.radius},gradient:{absolute:"0px 0px 0px 0px",background:"linear-gradient(to right, rgba("+o.r+","+o.g+","+o.b+`, 0) 0%,
|
|
236
|
-
rgba(`+o.r+","+o.g+","+o.b+", 1) 100%)",boxShadow:this.props.shadow,borderRadius:this.props.radius},container:{position:"relative",height:"100%",margin:"0 3px"},pointer:{position:"absolute",left:o.a*100+"%"},slider:{width:"4px",borderRadius:"1px",height:"8px",boxShadow:"0 0 2px rgba(0, 0, 0, .6)",background:"#fff",marginTop:"1px",transform:"translateX(-2px)"}},vertical:{gradient:{background:"linear-gradient(to bottom, rgba("+o.r+","+o.g+","+o.b+`, 0) 0%,
|
|
237
|
-
rgba(`+o.r+","+o.g+","+o.b+", 1) 100%)"},pointer:{left:0,top:o.a*100+"%"}},overwrite:P8({},this.props.style)},{vertical:this.props.direction==="vertical",overwrite:!0});return z.createElement("div",{style:i.alpha},z.createElement("div",{style:i.checkboard},z.createElement(hc,{renderers:this.props.renderers})),z.createElement("div",{style:i.gradient}),z.createElement("div",{style:i.container,ref:function(l){return r.container=l},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},z.createElement("div",{style:i.pointer},this.props.pointer?z.createElement(this.props.pointer,this.props):z.createElement("div",{style:i.slider}))))}}]),t}(z.PureComponent||z.Component),j8=function(){function e(t,n){for(var r=0;r<n.length;r++){var o=n[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function B8(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function H8(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function W8(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function z8(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var K8=1,sS=38,G8=40,U8=[sS,G8],V8=function(t){return U8.indexOf(t)>-1},Y8=function(t){return Number(String(t).replace(/%/g,""))},q8=1,en=function(e){z8(t,e);function t(n){H8(this,t);var r=W8(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return r.handleBlur=function(){r.state.blurValue&&r.setState({value:r.state.blurValue,blurValue:null})},r.handleChange=function(o){r.setUpdatedValue(o.target.value,o)},r.handleKeyDown=function(o){var i=Y8(o.target.value);if(!isNaN(i)&&V8(o.keyCode)){var a=r.getArrowOffset(),l=o.keyCode===sS?i+a:i-a;r.setUpdatedValue(l,o)}},r.handleDrag=function(o){if(r.props.dragLabel){var i=Math.round(r.props.value+o.movementX);i>=0&&i<=r.props.dragMax&&r.props.onChange&&r.props.onChange(r.getValueObjectWithLabel(i),o)}},r.handleMouseDown=function(o){r.props.dragLabel&&(o.preventDefault(),r.handleDrag(o),window.addEventListener("mousemove",r.handleDrag),window.addEventListener("mouseup",r.handleMouseUp))},r.handleMouseUp=function(){r.unbindEventListeners()},r.unbindEventListeners=function(){window.removeEventListener("mousemove",r.handleDrag),window.removeEventListener("mouseup",r.handleMouseUp)},r.state={value:String(n.value).toUpperCase(),blurValue:String(n.value).toUpperCase()},r.inputId="rc-editable-input-"+q8++,r}return j8(t,[{key:"componentDidUpdate",value:function(r,o){this.props.value!==this.state.value&&(r.value!==this.props.value||o.value!==this.state.value)&&(this.input===document.activeElement?this.setState({blurValue:String(this.props.value).toUpperCase()}):this.setState({value:String(this.props.value).toUpperCase(),blurValue:!this.state.blurValue&&String(this.props.value).toUpperCase()}))}},{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"getValueObjectWithLabel",value:function(r){return B8({},this.props.label,r)}},{key:"getArrowOffset",value:function(){return this.props.arrowOffset||K8}},{key:"setUpdatedValue",value:function(r,o){var i=this.props.label?this.getValueObjectWithLabel(r):r;this.props.onChange&&this.props.onChange(i,o),this.setState({value:r})}},{key:"render",value:function(){var r=this,o=jt({default:{wrap:{position:"relative"}},"user-override":{wrap:this.props.style&&this.props.style.wrap?this.props.style.wrap:{},input:this.props.style&&this.props.style.input?this.props.style.input:{},label:this.props.style&&this.props.style.label?this.props.style.label:{}},"dragLabel-true":{label:{cursor:"ew-resize"}}},{"user-override":!0},this.props);return z.createElement("div",{style:o.wrap},z.createElement("input",{id:this.inputId,style:o.input,ref:function(a){return r.input=a},value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,onBlur:this.handleBlur,placeholder:this.props.placeholder,spellCheck:"false"}),this.props.label&&!this.props.hideLabel?z.createElement("label",{htmlFor:this.inputId,style:o.label,onMouseDown:this.handleMouseDown},this.props.label):null)}}]),t}(z.PureComponent||z.Component),Z8=function(t,n,r,o){var i=o.clientWidth,a=o.clientHeight,l=typeof t.pageX=="number"?t.pageX:t.touches[0].pageX,u=typeof t.pageY=="number"?t.pageY:t.touches[0].pageY,p=l-(o.getBoundingClientRect().left+window.pageXOffset),m=u-(o.getBoundingClientRect().top+window.pageYOffset);if(n==="vertical"){var _=void 0;if(m<0)_=359;else if(m>a)_=0;else{var v=-(m*100/a)+100;_=360*v/100}if(r.h!==_)return{h:_,s:r.s,l:r.l,a:r.a,source:"hsl"}}else{var C=void 0;if(p<0)C=0;else if(p>i)C=359;else{var b=p*100/i;C=360*b/100}if(r.h!==C)return{h:C,s:r.s,l:r.l,a:r.a,source:"hsl"}}return null},J8=function(){function e(t,n){for(var r=0;r<n.length;r++){var o=n[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function X8(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function L_(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function Q8(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var pc=function(e){Q8(t,e);function t(){var n,r,o,i;X8(this,t);for(var a=arguments.length,l=Array(a),u=0;u<a;u++)l[u]=arguments[u];return i=(r=(o=L_(this,(n=t.__proto__||Object.getPrototypeOf(t)).call.apply(n,[this].concat(l))),o),o.handleChange=function(p){var m=Z8(p,o.props.direction,o.props.hsl,o.container);m&&typeof o.props.onChange=="function"&&o.props.onChange(m,p)},o.handleMouseDown=function(p){o.handleChange(p),window.addEventListener("mousemove",o.handleChange),window.addEventListener("mouseup",o.handleMouseUp)},o.handleMouseUp=function(){o.unbindEventListeners()},r),L_(o,i)}return J8(t,[{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"unbindEventListeners",value:function(){window.removeEventListener("mousemove",this.handleChange),window.removeEventListener("mouseup",this.handleMouseUp)}},{key:"render",value:function(){var r=this,o=this.props.direction,i=o===void 0?"horizontal":o,a=jt({default:{hue:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius,boxShadow:this.props.shadow},container:{padding:"0 2px",position:"relative",height:"100%",borderRadius:this.props.radius},pointer:{position:"absolute",left:this.props.hsl.h*100/360+"%"},slider:{marginTop:"1px",width:"4px",borderRadius:"1px",height:"8px",boxShadow:"0 0 2px rgba(0, 0, 0, .6)",background:"#fff",transform:"translateX(-2px)"}},vertical:{pointer:{left:"0px",top:-(this.props.hsl.h*100/360)+100+"%"}}},{vertical:i==="vertical"});return z.createElement("div",{style:a.hue},z.createElement("div",{className:"hue-"+i,style:a.container,ref:function(u){return r.container=u},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},z.createElement("style",null,`
|
|
238
|
-
.hue-horizontal {
|
|
239
|
-
background: linear-gradient(to right, #f00 0%, #ff0 17%, #0f0
|
|
240
|
-
33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);
|
|
241
|
-
background: -webkit-linear-gradient(to right, #f00 0%, #ff0
|
|
242
|
-
17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
.hue-vertical {
|
|
246
|
-
background: linear-gradient(to top, #f00 0%, #ff0 17%, #0f0 33%,
|
|
247
|
-
#0ff 50%, #00f 67%, #f0f 83%, #f00 100%);
|
|
248
|
-
background: -webkit-linear-gradient(to top, #f00 0%, #ff0 17%,
|
|
249
|
-
#0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);
|
|
250
|
-
}
|
|
251
|
-
`),z.createElement("div",{style:a.pointer},this.props.pointer?z.createElement(this.props.pointer,this.props):z.createElement("div",{style:a.slider}))))}}]),t}(z.PureComponent||z.Component),mg={exports:{}},Vd={exports:{}},cn={};/** @license React v16.13.1
|
|
252
|
-
* react-is.production.min.js
|
|
253
|
-
*
|
|
254
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
255
|
-
*
|
|
256
|
-
* This source code is licensed under the MIT license found in the
|
|
257
|
-
* LICENSE file in the root directory of this source tree.
|
|
258
|
-
*/var F_;function e9(){if(F_)return cn;F_=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,l=e?Symbol.for("react.context"):60110,u=e?Symbol.for("react.async_mode"):60111,p=e?Symbol.for("react.concurrent_mode"):60111,m=e?Symbol.for("react.forward_ref"):60112,_=e?Symbol.for("react.suspense"):60113,v=e?Symbol.for("react.suspense_list"):60120,C=e?Symbol.for("react.memo"):60115,b=e?Symbol.for("react.lazy"):60116,y=e?Symbol.for("react.block"):60121,N=e?Symbol.for("react.fundamental"):60117,R=e?Symbol.for("react.responder"):60118,O=e?Symbol.for("react.scope"):60119;function k(M){if(typeof M=="object"&&M!==null){var Y=M.$$typeof;switch(Y){case t:switch(M=M.type,M){case u:case p:case r:case i:case o:case _:return M;default:switch(M=M&&M.$$typeof,M){case l:case m:case b:case C:case a:return M;default:return Y}}case n:return Y}}}function I(M){return k(M)===p}return cn.AsyncMode=u,cn.ConcurrentMode=p,cn.ContextConsumer=l,cn.ContextProvider=a,cn.Element=t,cn.ForwardRef=m,cn.Fragment=r,cn.Lazy=b,cn.Memo=C,cn.Portal=n,cn.Profiler=i,cn.StrictMode=o,cn.Suspense=_,cn.isAsyncMode=function(M){return I(M)||k(M)===u},cn.isConcurrentMode=I,cn.isContextConsumer=function(M){return k(M)===l},cn.isContextProvider=function(M){return k(M)===a},cn.isElement=function(M){return typeof M=="object"&&M!==null&&M.$$typeof===t},cn.isForwardRef=function(M){return k(M)===m},cn.isFragment=function(M){return k(M)===r},cn.isLazy=function(M){return k(M)===b},cn.isMemo=function(M){return k(M)===C},cn.isPortal=function(M){return k(M)===n},cn.isProfiler=function(M){return k(M)===i},cn.isStrictMode=function(M){return k(M)===o},cn.isSuspense=function(M){return k(M)===_},cn.isValidElementType=function(M){return typeof M=="string"||typeof M=="function"||M===r||M===p||M===i||M===o||M===_||M===v||typeof M=="object"&&M!==null&&(M.$$typeof===b||M.$$typeof===C||M.$$typeof===a||M.$$typeof===l||M.$$typeof===m||M.$$typeof===N||M.$$typeof===R||M.$$typeof===O||M.$$typeof===y)},cn.typeOf=k,cn}var un={};/** @license React v16.13.1
|
|
259
|
-
* react-is.development.js
|
|
260
|
-
*
|
|
261
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
262
|
-
*
|
|
263
|
-
* This source code is licensed under the MIT license found in the
|
|
264
|
-
* LICENSE file in the root directory of this source tree.
|
|
265
|
-
*/var j_;function t9(){return j_||(j_=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,l=e?Symbol.for("react.context"):60110,u=e?Symbol.for("react.async_mode"):60111,p=e?Symbol.for("react.concurrent_mode"):60111,m=e?Symbol.for("react.forward_ref"):60112,_=e?Symbol.for("react.suspense"):60113,v=e?Symbol.for("react.suspense_list"):60120,C=e?Symbol.for("react.memo"):60115,b=e?Symbol.for("react.lazy"):60116,y=e?Symbol.for("react.block"):60121,N=e?Symbol.for("react.fundamental"):60117,R=e?Symbol.for("react.responder"):60118,O=e?Symbol.for("react.scope"):60119;function k(Se){return typeof Se=="string"||typeof Se=="function"||Se===r||Se===p||Se===i||Se===o||Se===_||Se===v||typeof Se=="object"&&Se!==null&&(Se.$$typeof===b||Se.$$typeof===C||Se.$$typeof===a||Se.$$typeof===l||Se.$$typeof===m||Se.$$typeof===N||Se.$$typeof===R||Se.$$typeof===O||Se.$$typeof===y)}function I(Se){if(typeof Se=="object"&&Se!==null){var He=Se.$$typeof;switch(He){case t:var le=Se.type;switch(le){case u:case p:case r:case i:case o:case _:return le;default:var ce=le&&le.$$typeof;switch(ce){case l:case m:case b:case C:case a:return ce;default:return He}}case n:return He}}}var M=u,Y=p,ee=l,re=a,Z=t,U=m,J=r,fe=b,ge=C,te=n,he=i,V=o,B=_,q=!1;function ie(Se){return q||(q=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),H(Se)||I(Se)===u}function H(Se){return I(Se)===p}function j(Se){return I(Se)===l}function Q(Se){return I(Se)===a}function F(Se){return typeof Se=="object"&&Se!==null&&Se.$$typeof===t}function w(Se){return I(Se)===m}function T(Se){return I(Se)===r}function P(Se){return I(Se)===b}function X(Se){return I(Se)===C}function ue(Se){return I(Se)===n}function pe(Se){return I(Se)===i}function se(Se){return I(Se)===o}function Ce(Se){return I(Se)===_}un.AsyncMode=M,un.ConcurrentMode=Y,un.ContextConsumer=ee,un.ContextProvider=re,un.Element=Z,un.ForwardRef=U,un.Fragment=J,un.Lazy=fe,un.Memo=ge,un.Portal=te,un.Profiler=he,un.StrictMode=V,un.Suspense=B,un.isAsyncMode=ie,un.isConcurrentMode=H,un.isContextConsumer=j,un.isContextProvider=Q,un.isElement=F,un.isForwardRef=w,un.isFragment=T,un.isLazy=P,un.isMemo=X,un.isPortal=ue,un.isProfiler=pe,un.isStrictMode=se,un.isSuspense=Ce,un.isValidElementType=k,un.typeOf=I}()),un}var B_;function lS(){return B_||(B_=1,process.env.NODE_ENV==="production"?Vd.exports=e9():Vd.exports=t9()),Vd.exports}/*
|
|
266
|
-
object-assign
|
|
267
|
-
(c) Sindre Sorhus
|
|
268
|
-
@license MIT
|
|
269
|
-
*/var _p,H_;function n9(){if(H_)return _p;H_=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(i){if(i==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(i)}function o(){try{if(!Object.assign)return!1;var i=new String("abc");if(i[5]="de",Object.getOwnPropertyNames(i)[0]==="5")return!1;for(var a={},l=0;l<10;l++)a["_"+String.fromCharCode(l)]=l;var u=Object.getOwnPropertyNames(a).map(function(m){return a[m]});if(u.join("")!=="0123456789")return!1;var p={};return"abcdefghijklmnopqrst".split("").forEach(function(m){p[m]=m}),Object.keys(Object.assign({},p)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return _p=o()?Object.assign:function(i,a){for(var l,u=r(i),p,m=1;m<arguments.length;m++){l=Object(arguments[m]);for(var _ in l)t.call(l,_)&&(u[_]=l[_]);if(e){p=e(l);for(var v=0;v<p.length;v++)n.call(l,p[v])&&(u[p[v]]=l[p[v]])}}return u},_p}var xp,W_;function Bm(){if(W_)return xp;W_=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return xp=e,xp}var Ep,z_;function cS(){return z_||(z_=1,Ep=Function.call.bind(Object.prototype.hasOwnProperty)),Ep}var Cp,K_;function r9(){if(K_)return Cp;K_=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Bm(),n={},r=cS();e=function(i){var a="Warning: "+i;typeof console<"u"&&console.error(a);try{throw new Error(a)}catch{}}}function o(i,a,l,u,p){if(process.env.NODE_ENV!=="production"){for(var m in i)if(r(i,m)){var _;try{if(typeof i[m]!="function"){var v=Error((u||"React class")+": "+l+" type `"+m+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[m]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw v.name="Invariant Violation",v}_=i[m](a,m,u,l,null,t)}catch(b){_=b}if(_&&!(_ instanceof Error)&&e((u||"React class")+": type specification of "+l+" `"+m+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof _+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),_ instanceof Error&&!(_.message in n)){n[_.message]=!0;var C=p?p():"";e("Failed "+l+" type: "+_.message+(C??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},Cp=o,Cp}var wp,G_;function o9(){if(G_)return wp;G_=1;var e=lS(),t=n9(),n=Bm(),r=cS(),o=r9(),i=function(){};process.env.NODE_ENV!=="production"&&(i=function(l){var u="Warning: "+l;typeof console<"u"&&console.error(u);try{throw new Error(u)}catch{}});function a(){return null}return wp=function(l,u){var p=typeof Symbol=="function"&&Symbol.iterator,m="@@iterator";function _(H){var j=H&&(p&&H[p]||H[m]);if(typeof j=="function")return j}var v="<<anonymous>>",C={array:R("array"),bigint:R("bigint"),bool:R("boolean"),func:R("function"),number:R("number"),object:R("object"),string:R("string"),symbol:R("symbol"),any:O(),arrayOf:k,element:I(),elementType:M(),instanceOf:Y,node:U(),objectOf:re,oneOf:ee,oneOfType:Z,shape:fe,exact:ge};function b(H,j){return H===j?H!==0||1/H===1/j:H!==H&&j!==j}function y(H,j){this.message=H,this.data=j&&typeof j=="object"?j:{},this.stack=""}y.prototype=Error.prototype;function N(H){if(process.env.NODE_ENV!=="production")var j={},Q=0;function F(T,P,X,ue,pe,se,Ce){if(ue=ue||v,se=se||X,Ce!==n){if(u){var Se=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw Se.name="Invariant Violation",Se}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var He=ue+":"+X;!j[He]&&Q<3&&(i("You are manually calling a React.PropTypes validation function for the `"+se+"` prop on `"+ue+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),j[He]=!0,Q++)}}return P[X]==null?T?P[X]===null?new y("The "+pe+" `"+se+"` is marked as required "+("in `"+ue+"`, but its value is `null`.")):new y("The "+pe+" `"+se+"` is marked as required in "+("`"+ue+"`, but its value is `undefined`.")):null:H(P,X,ue,pe,se)}var w=F.bind(null,!1);return w.isRequired=F.bind(null,!0),w}function R(H){function j(Q,F,w,T,P,X){var ue=Q[F],pe=V(ue);if(pe!==H){var se=B(ue);return new y("Invalid "+T+" `"+P+"` of type "+("`"+se+"` supplied to `"+w+"`, expected ")+("`"+H+"`."),{expectedType:H})}return null}return N(j)}function O(){return N(a)}function k(H){function j(Q,F,w,T,P){if(typeof H!="function")return new y("Property `"+P+"` of component `"+w+"` has invalid PropType notation inside arrayOf.");var X=Q[F];if(!Array.isArray(X)){var ue=V(X);return new y("Invalid "+T+" `"+P+"` of type "+("`"+ue+"` supplied to `"+w+"`, expected an array."))}for(var pe=0;pe<X.length;pe++){var se=H(X,pe,w,T,P+"["+pe+"]",n);if(se instanceof Error)return se}return null}return N(j)}function I(){function H(j,Q,F,w,T){var P=j[Q];if(!l(P)){var X=V(P);return new y("Invalid "+w+" `"+T+"` of type "+("`"+X+"` supplied to `"+F+"`, expected a single ReactElement."))}return null}return N(H)}function M(){function H(j,Q,F,w,T){var P=j[Q];if(!e.isValidElementType(P)){var X=V(P);return new y("Invalid "+w+" `"+T+"` of type "+("`"+X+"` supplied to `"+F+"`, expected a single ReactElement type."))}return null}return N(H)}function Y(H){function j(Q,F,w,T,P){if(!(Q[F]instanceof H)){var X=H.name||v,ue=ie(Q[F]);return new y("Invalid "+T+" `"+P+"` of type "+("`"+ue+"` supplied to `"+w+"`, expected ")+("instance of `"+X+"`."))}return null}return N(j)}function ee(H){if(!Array.isArray(H))return process.env.NODE_ENV!=="production"&&(arguments.length>1?i("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):i("Invalid argument supplied to oneOf, expected an array.")),a;function j(Q,F,w,T,P){for(var X=Q[F],ue=0;ue<H.length;ue++)if(b(X,H[ue]))return null;var pe=JSON.stringify(H,function(Ce,Se){var He=B(Se);return He==="symbol"?String(Se):Se});return new y("Invalid "+T+" `"+P+"` of value `"+String(X)+"` "+("supplied to `"+w+"`, expected one of "+pe+"."))}return N(j)}function re(H){function j(Q,F,w,T,P){if(typeof H!="function")return new y("Property `"+P+"` of component `"+w+"` has invalid PropType notation inside objectOf.");var X=Q[F],ue=V(X);if(ue!=="object")return new y("Invalid "+T+" `"+P+"` of type "+("`"+ue+"` supplied to `"+w+"`, expected an object."));for(var pe in X)if(r(X,pe)){var se=H(X,pe,w,T,P+"."+pe,n);if(se instanceof Error)return se}return null}return N(j)}function Z(H){if(!Array.isArray(H))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var j=0;j<H.length;j++){var Q=H[j];if(typeof Q!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+q(Q)+" at index "+j+"."),a}function F(w,T,P,X,ue){for(var pe=[],se=0;se<H.length;se++){var Ce=H[se],Se=Ce(w,T,P,X,ue,n);if(Se==null)return null;Se.data&&r(Se.data,"expectedType")&&pe.push(Se.data.expectedType)}var He=pe.length>0?", expected one of type ["+pe.join(", ")+"]":"";return new y("Invalid "+X+" `"+ue+"` supplied to "+("`"+P+"`"+He+"."))}return N(F)}function U(){function H(j,Q,F,w,T){return te(j[Q])?null:new y("Invalid "+w+" `"+T+"` supplied to "+("`"+F+"`, expected a ReactNode."))}return N(H)}function J(H,j,Q,F,w){return new y((H||"React class")+": "+j+" type `"+Q+"."+F+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+w+"`.")}function fe(H){function j(Q,F,w,T,P){var X=Q[F],ue=V(X);if(ue!=="object")return new y("Invalid "+T+" `"+P+"` of type `"+ue+"` "+("supplied to `"+w+"`, expected `object`."));for(var pe in H){var se=H[pe];if(typeof se!="function")return J(w,T,P,pe,B(se));var Ce=se(X,pe,w,T,P+"."+pe,n);if(Ce)return Ce}return null}return N(j)}function ge(H){function j(Q,F,w,T,P){var X=Q[F],ue=V(X);if(ue!=="object")return new y("Invalid "+T+" `"+P+"` of type `"+ue+"` "+("supplied to `"+w+"`, expected `object`."));var pe=t({},Q[F],H);for(var se in pe){var Ce=H[se];if(r(H,se)&&typeof Ce!="function")return J(w,T,P,se,B(Ce));if(!Ce)return new y("Invalid "+T+" `"+P+"` key `"+se+"` supplied to `"+w+"`.\nBad object: "+JSON.stringify(Q[F],null," ")+`
|
|
270
|
-
Valid keys: `+JSON.stringify(Object.keys(H),null," "));var Se=Ce(X,se,w,T,P+"."+se,n);if(Se)return Se}return null}return N(j)}function te(H){switch(typeof H){case"number":case"string":case"undefined":return!0;case"boolean":return!H;case"object":if(Array.isArray(H))return H.every(te);if(H===null||l(H))return!0;var j=_(H);if(j){var Q=j.call(H),F;if(j!==H.entries){for(;!(F=Q.next()).done;)if(!te(F.value))return!1}else for(;!(F=Q.next()).done;){var w=F.value;if(w&&!te(w[1]))return!1}}else return!1;return!0;default:return!1}}function he(H,j){return H==="symbol"?!0:j?j["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&j instanceof Symbol:!1}function V(H){var j=typeof H;return Array.isArray(H)?"array":H instanceof RegExp?"object":he(j,H)?"symbol":j}function B(H){if(typeof H>"u"||H===null)return""+H;var j=V(H);if(j==="object"){if(H instanceof Date)return"date";if(H instanceof RegExp)return"regexp"}return j}function q(H){var j=B(H);switch(j){case"array":case"object":return"an "+j;case"boolean":case"date":case"regexp":return"a "+j;default:return j}}function ie(H){return!H.constructor||!H.constructor.name?v:H.constructor.name}return C.checkPropTypes=o,C.resetWarningCache=o.resetWarningCache,C.PropTypes=C,C},wp}var Np,U_;function i9(){if(U_)return Np;U_=1;var e=Bm();function t(){}function n(){}return n.resetWarningCache=t,Np=function(){function r(a,l,u,p,m,_){if(_!==e){var v=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw v.name="Invariant Violation",v}}r.isRequired=r;function o(){return r}var i={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return i.PropTypes=i,i},Np}if(process.env.NODE_ENV!=="production"){var a9=lS(),s9=!0;mg.exports=o9()(a9.isElement,s9)}else mg.exports=i9()();var l9=mg.exports;const ut=E1(l9);function c9(){this.__data__=[],this.size=0}function Zu(e,t){return e===t||e!==e&&t!==t}function Qf(e,t){for(var n=e.length;n--;)if(Zu(e[n][0],t))return n;return-1}var u9=Array.prototype,d9=u9.splice;function f9(e){var t=this.__data__,n=Qf(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():d9.call(t,n,1),--this.size,!0}function h9(e){var t=this.__data__,n=Qf(t,e);return n<0?void 0:t[n][1]}function p9(e){return Qf(this.__data__,e)>-1}function g9(e,t){var n=this.__data__,r=Qf(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function na(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}na.prototype.clear=c9;na.prototype.delete=f9;na.prototype.get=h9;na.prototype.has=p9;na.prototype.set=g9;function m9(){this.__data__=new na,this.size=0}function v9(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function y9(e){return this.__data__.get(e)}function b9(e){return this.__data__.has(e)}var uS=typeof global=="object"&&global&&global.Object===Object&&global,_9=typeof self=="object"&&self&&self.Object===Object&&self,qo=uS||_9||Function("return this")(),ja=qo.Symbol,dS=Object.prototype,x9=dS.hasOwnProperty,E9=dS.toString,fu=ja?ja.toStringTag:void 0;function C9(e){var t=x9.call(e,fu),n=e[fu];try{e[fu]=void 0;var r=!0}catch{}var o=E9.call(e);return r&&(t?e[fu]=n:delete e[fu]),o}var w9=Object.prototype,N9=w9.toString;function T9(e){return N9.call(e)}var S9="[object Null]",O9="[object Undefined]",V_=ja?ja.toStringTag:void 0;function $s(e){return e==null?e===void 0?O9:S9:V_&&V_ in Object(e)?C9(e):T9(e)}function xo(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var A9="[object AsyncFunction]",R9="[object Function]",$9="[object GeneratorFunction]",D9="[object Proxy]";function Hm(e){if(!xo(e))return!1;var t=$s(e);return t==R9||t==$9||t==A9||t==D9}var Tp=qo["__core-js_shared__"],Y_=function(){var e=/[^.]+$/.exec(Tp&&Tp.keys&&Tp.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function M9(e){return!!Y_&&Y_ in e}var k9=Function.prototype,P9=k9.toString;function Ds(e){if(e!=null){try{return P9.call(e)}catch{}try{return e+""}catch{}}return""}var I9=/[\\^$.*+?()[\]{}|]/g,L9=/^\[object .+?Constructor\]$/,F9=Function.prototype,j9=Object.prototype,B9=F9.toString,H9=j9.hasOwnProperty,W9=RegExp("^"+B9.call(H9).replace(I9,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function z9(e){if(!xo(e)||M9(e))return!1;var t=Hm(e)?W9:L9;return t.test(Ds(e))}function K9(e,t){return e==null?void 0:e[t]}function Ms(e,t){var n=K9(e,t);return z9(n)?n:void 0}var Ou=Ms(qo,"Map"),Au=Ms(Object,"create");function G9(){this.__data__=Au?Au(null):{},this.size=0}function U9(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var V9="__lodash_hash_undefined__",Y9=Object.prototype,q9=Y9.hasOwnProperty;function Z9(e){var t=this.__data__;if(Au){var n=t[e];return n===V9?void 0:n}return q9.call(t,e)?t[e]:void 0}var J9=Object.prototype,X9=J9.hasOwnProperty;function Q9(e){var t=this.__data__;return Au?t[e]!==void 0:X9.call(t,e)}var eV="__lodash_hash_undefined__";function tV(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Au&&t===void 0?eV:t,this}function Ns(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Ns.prototype.clear=G9;Ns.prototype.delete=U9;Ns.prototype.get=Z9;Ns.prototype.has=Q9;Ns.prototype.set=tV;function nV(){this.size=0,this.__data__={hash:new Ns,map:new(Ou||na),string:new Ns}}function rV(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function eh(e,t){var n=e.__data__;return rV(t)?n[typeof t=="string"?"string":"hash"]:n.map}function oV(e){var t=eh(this,e).delete(e);return this.size-=t?1:0,t}function iV(e){return eh(this,e).get(e)}function aV(e){return eh(this,e).has(e)}function sV(e,t){var n=eh(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function ra(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}ra.prototype.clear=nV;ra.prototype.delete=oV;ra.prototype.get=iV;ra.prototype.has=aV;ra.prototype.set=sV;var lV=200;function cV(e,t){var n=this.__data__;if(n instanceof na){var r=n.__data__;if(!Ou||r.length<lV-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new ra(r)}return n.set(e,t),this.size=n.size,this}function bi(e){var t=this.__data__=new na(e);this.size=t.size}bi.prototype.clear=m9;bi.prototype.delete=v9;bi.prototype.get=y9;bi.prototype.has=b9;bi.prototype.set=cV;var Ef=function(){try{var e=Ms(Object,"defineProperty");return e({},"",{}),e}catch{}}();function Wm(e,t,n){t=="__proto__"&&Ef?Ef(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function vg(e,t,n){(n!==void 0&&!Zu(e[t],n)||n===void 0&&!(t in e))&&Wm(e,t,n)}function uV(e){return function(t,n,r){for(var o=-1,i=Object(t),a=r(t),l=a.length;l--;){var u=a[++o];if(n(i[u],u,i)===!1)break}return t}}var fS=uV(),hS=typeof exports=="object"&&exports&&!exports.nodeType&&exports,q_=hS&&typeof module=="object"&&module&&!module.nodeType&&module,dV=q_&&q_.exports===hS,Z_=dV?qo.Buffer:void 0;Z_&&Z_.allocUnsafe;function fV(e,t){return e.slice()}var Cf=qo.Uint8Array;function hV(e){var t=new e.constructor(e.byteLength);return new Cf(t).set(new Cf(e)),t}function pV(e,t){var n=hV(e.buffer);return new e.constructor(n,e.byteOffset,e.length)}function gV(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}var J_=Object.create,mV=function(){function e(){}return function(t){if(!xo(t))return{};if(J_)return J_(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function pS(e,t){return function(n){return e(t(n))}}var gS=pS(Object.getPrototypeOf,Object),vV=Object.prototype;function zm(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||vV;return e===n}function yV(e){return typeof e.constructor=="function"&&!zm(e)?mV(gS(e)):{}}function Ba(e){return e!=null&&typeof e=="object"}var bV="[object Arguments]";function X_(e){return Ba(e)&&$s(e)==bV}var mS=Object.prototype,_V=mS.hasOwnProperty,xV=mS.propertyIsEnumerable,wf=X_(function(){return arguments}())?X_:function(e){return Ba(e)&&_V.call(e,"callee")&&!xV.call(e,"callee")},so=Array.isArray,EV=9007199254740991;function Km(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=EV}function gc(e){return e!=null&&Km(e.length)&&!Hm(e)}function CV(e){return Ba(e)&&gc(e)}function wV(){return!1}var vS=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Q_=vS&&typeof module=="object"&&module&&!module.nodeType&&module,NV=Q_&&Q_.exports===vS,ex=NV?qo.Buffer:void 0,TV=ex?ex.isBuffer:void 0,Nf=TV||wV,SV="[object Object]",OV=Function.prototype,AV=Object.prototype,yS=OV.toString,RV=AV.hasOwnProperty,$V=yS.call(Object);function DV(e){if(!Ba(e)||$s(e)!=SV)return!1;var t=gS(e);if(t===null)return!0;var n=RV.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&yS.call(n)==$V}var MV="[object Arguments]",kV="[object Array]",PV="[object Boolean]",IV="[object Date]",LV="[object Error]",FV="[object Function]",jV="[object Map]",BV="[object Number]",HV="[object Object]",WV="[object RegExp]",zV="[object Set]",KV="[object String]",GV="[object WeakMap]",UV="[object ArrayBuffer]",VV="[object DataView]",YV="[object Float32Array]",qV="[object Float64Array]",ZV="[object Int8Array]",JV="[object Int16Array]",XV="[object Int32Array]",QV="[object Uint8Array]",eY="[object Uint8ClampedArray]",tY="[object Uint16Array]",nY="[object Uint32Array]",Sn={};Sn[YV]=Sn[qV]=Sn[ZV]=Sn[JV]=Sn[XV]=Sn[QV]=Sn[eY]=Sn[tY]=Sn[nY]=!0;Sn[MV]=Sn[kV]=Sn[UV]=Sn[PV]=Sn[VV]=Sn[IV]=Sn[LV]=Sn[FV]=Sn[jV]=Sn[BV]=Sn[HV]=Sn[WV]=Sn[zV]=Sn[KV]=Sn[GV]=!1;function rY(e){return Ba(e)&&Km(e.length)&&!!Sn[$s(e)]}function oY(e){return function(t){return e(t)}}var bS=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Eu=bS&&typeof module=="object"&&module&&!module.nodeType&&module,iY=Eu&&Eu.exports===bS,Sp=iY&&uS.process,tx=function(){try{var e=Eu&&Eu.require&&Eu.require("util").types;return e||Sp&&Sp.binding&&Sp.binding("util")}catch{}}(),nx=tx&&tx.isTypedArray,Gm=nx?oY(nx):rY;function yg(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var aY=Object.prototype,sY=aY.hasOwnProperty;function lY(e,t,n){var r=e[t];(!(sY.call(e,t)&&Zu(r,n))||n===void 0&&!(t in e))&&Wm(e,t,n)}function cY(e,t,n,r){var o=!n;n||(n={});for(var i=-1,a=t.length;++i<a;){var l=t[i],u=void 0;u===void 0&&(u=e[l]),o?Wm(n,l,u):lY(n,l,u)}return n}function uY(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var dY=9007199254740991,fY=/^(?:0|[1-9]\d*)$/;function Um(e,t){var n=typeof e;return t=t??dY,!!t&&(n=="number"||n!="symbol"&&fY.test(e))&&e>-1&&e%1==0&&e<t}var hY=Object.prototype,pY=hY.hasOwnProperty;function _S(e,t){var n=so(e),r=!n&&wf(e),o=!n&&!r&&Nf(e),i=!n&&!r&&!o&&Gm(e),a=n||r||o||i,l=a?uY(e.length,String):[],u=l.length;for(var p in e)(t||pY.call(e,p))&&!(a&&(p=="length"||o&&(p=="offset"||p=="parent")||i&&(p=="buffer"||p=="byteLength"||p=="byteOffset")||Um(p,u)))&&l.push(p);return l}function gY(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var mY=Object.prototype,vY=mY.hasOwnProperty;function yY(e){if(!xo(e))return gY(e);var t=zm(e),n=[];for(var r in e)r=="constructor"&&(t||!vY.call(e,r))||n.push(r);return n}function xS(e){return gc(e)?_S(e,!0):yY(e)}function bY(e){return cY(e,xS(e))}function _Y(e,t,n,r,o,i,a){var l=yg(e,n),u=yg(t,n),p=a.get(u);if(p){vg(e,n,p);return}var m=i?i(l,u,n+"",e,t,a):void 0,_=m===void 0;if(_){var v=so(u),C=!v&&Nf(u),b=!v&&!C&&Gm(u);m=u,v||C||b?so(l)?m=l:CV(l)?m=gV(l):C?(_=!1,m=fV(u)):b?(_=!1,m=pV(u)):m=[]:DV(u)||wf(u)?(m=l,wf(l)?m=bY(l):(!xo(l)||Hm(l))&&(m=yV(u))):_=!1}_&&(a.set(u,m),o(m,u,r,i,a),a.delete(u)),vg(e,n,m)}function ES(e,t,n,r,o){e!==t&&fS(t,function(i,a){if(o||(o=new bi),xo(i))_Y(e,t,a,n,ES,r,o);else{var l=r?r(yg(e,a),i,a+"",e,t,o):void 0;l===void 0&&(l=i),vg(e,a,l)}},xS)}function th(e){return e}function xY(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var rx=Math.max;function EY(e,t,n){return t=rx(t===void 0?e.length-1:t,0),function(){for(var r=arguments,o=-1,i=rx(r.length-t,0),a=Array(i);++o<i;)a[o]=r[t+o];o=-1;for(var l=Array(t+1);++o<t;)l[o]=r[o];return l[t]=n(a),xY(e,this,l)}}function CY(e){return function(){return e}}var wY=Ef?function(e,t){return Ef(e,"toString",{configurable:!0,enumerable:!1,value:CY(t),writable:!0})}:th,NY=800,TY=16,SY=Date.now;function OY(e){var t=0,n=0;return function(){var r=SY(),o=TY-(r-n);if(n=r,o>0){if(++t>=NY)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var AY=OY(wY);function RY(e,t){return AY(EY(e,t,th),e+"")}function $Y(e,t,n){if(!xo(n))return!1;var r=typeof t;return(r=="number"?gc(n)&&Um(t,n.length):r=="string"&&t in n)?Zu(n[t],e):!1}function DY(e){return RY(function(t,n){var r=-1,o=n.length,i=o>1?n[o-1]:void 0,a=o>2?n[2]:void 0;for(i=e.length>3&&typeof i=="function"?(o--,i):void 0,a&&$Y(n[0],n[1],a)&&(i=o<3?void 0:i,o=1),t=Object(t);++r<o;){var l=n[r];l&&e(t,l,r,i)}return t})}var Kr=DY(function(e,t,n){ES(e,t,n)}),Ju=function(t){var n=t.zDepth,r=t.radius,o=t.background,i=t.children,a=t.styles,l=a===void 0?{}:a,u=jt(Kr({default:{wrap:{position:"relative",display:"inline-block"},content:{position:"relative"},bg:{absolute:"0px 0px 0px 0px",boxShadow:"0 "+n+"px "+n*4+"px rgba(0,0,0,.24)",borderRadius:r,background:o}},"zDepth-0":{bg:{boxShadow:"none"}},"zDepth-1":{bg:{boxShadow:"0 2px 10px rgba(0,0,0,.12), 0 2px 5px rgba(0,0,0,.16)"}},"zDepth-2":{bg:{boxShadow:"0 6px 20px rgba(0,0,0,.19), 0 8px 17px rgba(0,0,0,.2)"}},"zDepth-3":{bg:{boxShadow:"0 17px 50px rgba(0,0,0,.19), 0 12px 15px rgba(0,0,0,.24)"}},"zDepth-4":{bg:{boxShadow:"0 25px 55px rgba(0,0,0,.21), 0 16px 28px rgba(0,0,0,.22)"}},"zDepth-5":{bg:{boxShadow:"0 40px 77px rgba(0,0,0,.22), 0 27px 24px rgba(0,0,0,.2)"}},square:{bg:{borderRadius:"0"}},circle:{bg:{borderRadius:"50%"}}},l),{"zDepth-1":n===1});return z.createElement("div",{style:u.wrap},z.createElement("div",{style:u.bg}),z.createElement("div",{style:u.content},i))};Ju.propTypes={background:ut.string,zDepth:ut.oneOf([0,1,2,3,4,5]),radius:ut.number,styles:ut.object};Ju.defaultProps={background:"#fff",zDepth:1,radius:2,styles:{}};var Op=function(){return qo.Date.now()},MY=/\s/;function kY(e){for(var t=e.length;t--&&MY.test(e.charAt(t)););return t}var PY=/^\s+/;function IY(e){return e&&e.slice(0,kY(e)+1).replace(PY,"")}var LY="[object Symbol]";function nh(e){return typeof e=="symbol"||Ba(e)&&$s(e)==LY}var ox=NaN,FY=/^[-+]0x[0-9a-f]+$/i,jY=/^0b[01]+$/i,BY=/^0o[0-7]+$/i,HY=parseInt;function ix(e){if(typeof e=="number")return e;if(nh(e))return ox;if(xo(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=xo(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=IY(e);var n=jY.test(e);return n||BY.test(e)?HY(e.slice(2),n?2:8):FY.test(e)?ox:+e}var WY="Expected a function",zY=Math.max,KY=Math.min;function CS(e,t,n){var r,o,i,a,l,u,p=0,m=!1,_=!1,v=!0;if(typeof e!="function")throw new TypeError(WY);t=ix(t)||0,xo(n)&&(m=!!n.leading,_="maxWait"in n,i=_?zY(ix(n.maxWait)||0,t):i,v="trailing"in n?!!n.trailing:v);function C(Y){var ee=r,re=o;return r=o=void 0,p=Y,a=e.apply(re,ee),a}function b(Y){return p=Y,l=setTimeout(R,t),m?C(Y):a}function y(Y){var ee=Y-u,re=Y-p,Z=t-ee;return _?KY(Z,i-re):Z}function N(Y){var ee=Y-u,re=Y-p;return u===void 0||ee>=t||ee<0||_&&re>=i}function R(){var Y=Op();if(N(Y))return O(Y);l=setTimeout(R,y(Y))}function O(Y){return l=void 0,v&&r?C(Y):(r=o=void 0,a)}function k(){l!==void 0&&clearTimeout(l),p=0,r=u=o=l=void 0}function I(){return l===void 0?a:O(Op())}function M(){var Y=Op(),ee=N(Y);if(r=arguments,o=this,u=Y,ee){if(l===void 0)return b(u);if(_)return clearTimeout(l),l=setTimeout(R,t),C(u)}return l===void 0&&(l=setTimeout(R,t)),a}return M.cancel=k,M.flush=I,M}var GY="Expected a function";function UY(e,t,n){var r=!0,o=!0;if(typeof e!="function")throw new TypeError(GY);return xo(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),CS(e,t,{leading:r,maxWait:t,trailing:o})}var VY=function(t,n,r){var o=r.getBoundingClientRect(),i=o.width,a=o.height,l=typeof t.pageX=="number"?t.pageX:t.touches[0].pageX,u=typeof t.pageY=="number"?t.pageY:t.touches[0].pageY,p=l-(r.getBoundingClientRect().left+window.pageXOffset),m=u-(r.getBoundingClientRect().top+window.pageYOffset);p<0?p=0:p>i&&(p=i),m<0?m=0:m>a&&(m=a);var _=p/i,v=1-m/a;return{h:n.h,s:_,v,a:n.a,source:"hsv"}},YY=function(){function e(t,n){for(var r=0;r<n.length;r++){var o=n[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function qY(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ZY(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function JY(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var rh=function(e){JY(t,e);function t(n){qY(this,t);var r=ZY(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,n));return r.handleChange=function(o){typeof r.props.onChange=="function"&&r.throttle(r.props.onChange,VY(o,r.props.hsl,r.container),o)},r.handleMouseDown=function(o){r.handleChange(o);var i=r.getContainerRenderWindow();i.addEventListener("mousemove",r.handleChange),i.addEventListener("mouseup",r.handleMouseUp)},r.handleMouseUp=function(){r.unbindEventListeners()},r.throttle=UY(function(o,i,a){o(i,a)},50),r}return YY(t,[{key:"componentWillUnmount",value:function(){this.throttle.cancel(),this.unbindEventListeners()}},{key:"getContainerRenderWindow",value:function(){for(var r=this.container,o=window;!o.document.contains(r)&&o.parent!==o;)o=o.parent;return o}},{key:"unbindEventListeners",value:function(){var r=this.getContainerRenderWindow();r.removeEventListener("mousemove",this.handleChange),r.removeEventListener("mouseup",this.handleMouseUp)}},{key:"render",value:function(){var r=this,o=this.props.style||{},i=o.color,a=o.white,l=o.black,u=o.pointer,p=o.circle,m=jt({default:{color:{absolute:"0px 0px 0px 0px",background:"hsl("+this.props.hsl.h+",100%, 50%)",borderRadius:this.props.radius},white:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius},black:{absolute:"0px 0px 0px 0px",boxShadow:this.props.shadow,borderRadius:this.props.radius},pointer:{position:"absolute",top:-(this.props.hsv.v*100)+100+"%",left:this.props.hsv.s*100+"%",cursor:"default"},circle:{width:"4px",height:"4px",boxShadow:`0 0 0 1.5px #fff, inset 0 0 1px 1px rgba(0,0,0,.3),
|
|
271
|
-
0 0 1px 2px rgba(0,0,0,.4)`,borderRadius:"50%",cursor:"hand",transform:"translate(-2px, -2px)"}},custom:{color:i,white:a,black:l,pointer:u,circle:p}},{custom:!!this.props.style});return z.createElement("div",{style:m.color,ref:function(v){return r.container=v},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},z.createElement("style",null,`
|
|
272
|
-
.saturation-white {
|
|
273
|
-
background: -webkit-linear-gradient(to right, #fff, rgba(255,255,255,0));
|
|
274
|
-
background: linear-gradient(to right, #fff, rgba(255,255,255,0));
|
|
275
|
-
}
|
|
276
|
-
.saturation-black {
|
|
277
|
-
background: -webkit-linear-gradient(to top, #000, rgba(0,0,0,0));
|
|
278
|
-
background: linear-gradient(to top, #000, rgba(0,0,0,0));
|
|
279
|
-
}
|
|
280
|
-
`),z.createElement("div",{style:m.white,className:"saturation-white"},z.createElement("div",{style:m.black,className:"saturation-black"}),z.createElement("div",{style:m.pointer},this.props.pointer?z.createElement(this.props.pointer,this.props):z.createElement("div",{style:m.circle}))))}}]),t}(z.PureComponent||z.Component);function XY(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}var QY=pS(Object.keys,Object),e7=Object.prototype,t7=e7.hasOwnProperty;function n7(e){if(!zm(e))return QY(e);var t=[];for(var n in Object(e))t7.call(e,n)&&n!="constructor"&&t.push(n);return t}function Vm(e){return gc(e)?_S(e):n7(e)}function r7(e,t){return e&&fS(e,t,Vm)}function o7(e,t){return function(n,r){if(n==null)return n;if(!gc(n))return e(n,r);for(var o=n.length,i=-1,a=Object(n);++i<o&&r(a[i],i,a)!==!1;);return n}}var wS=o7(r7);function i7(e){return typeof e=="function"?e:th}function a7(e,t){var n=so(e)?XY:wS;return n(e,i7(t))}function Tf(e){"@babel/helpers - typeof";return Tf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Tf(e)}var s7=/^\s+/,l7=/\s+$/;function St(e,t){if(e=e||"",t=t||{},e instanceof St)return e;if(!(this instanceof St))return new St(e,t);var n=c7(e);this._originalInput=e,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=Math.round(100*this._a)/100,this._format=t.format||n.format,this._gradientType=t.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=n.ok}St.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},getLuminance:function(){var t=this.toRgb(),n,r,o,i,a,l;return n=t.r/255,r=t.g/255,o=t.b/255,n<=.03928?i=n/12.92:i=Math.pow((n+.055)/1.055,2.4),r<=.03928?a=r/12.92:a=Math.pow((r+.055)/1.055,2.4),o<=.03928?l=o/12.92:l=Math.pow((o+.055)/1.055,2.4),.2126*i+.7152*a+.0722*l},setAlpha:function(t){return this._a=NS(t),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var t=sx(this._r,this._g,this._b);return{h:t.h*360,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=sx(this._r,this._g,this._b),n=Math.round(t.h*360),r=Math.round(t.s*100),o=Math.round(t.v*100);return this._a==1?"hsv("+n+", "+r+"%, "+o+"%)":"hsva("+n+", "+r+"%, "+o+"%, "+this._roundA+")"},toHsl:function(){var t=ax(this._r,this._g,this._b);return{h:t.h*360,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=ax(this._r,this._g,this._b),n=Math.round(t.h*360),r=Math.round(t.s*100),o=Math.round(t.l*100);return this._a==1?"hsl("+n+", "+r+"%, "+o+"%)":"hsla("+n+", "+r+"%, "+o+"%, "+this._roundA+")"},toHex:function(t){return lx(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(t){return h7(this._r,this._g,this._b,this._a,t)},toHex8String:function(t){return"#"+this.toHex8(t)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(Dn(this._r,255)*100)+"%",g:Math.round(Dn(this._g,255)*100)+"%",b:Math.round(Dn(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(Dn(this._r,255)*100)+"%, "+Math.round(Dn(this._g,255)*100)+"%, "+Math.round(Dn(this._b,255)*100)+"%)":"rgba("+Math.round(Dn(this._r,255)*100)+"%, "+Math.round(Dn(this._g,255)*100)+"%, "+Math.round(Dn(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:N7[lx(this._r,this._g,this._b,!0)]||!1},toFilter:function(t){var n="#"+cx(this._r,this._g,this._b,this._a),r=n,o=this._gradientType?"GradientType = 1, ":"";if(t){var i=St(t);r="#"+cx(i._r,i._g,i._b,i._a)}return"progid:DXImageTransform.Microsoft.gradient("+o+"startColorstr="+n+",endColorstr="+r+")"},toString:function(t){var n=!!t;t=t||this._format;var r=!1,o=this._a<1&&this._a>=0,i=!n&&o&&(t==="hex"||t==="hex6"||t==="hex3"||t==="hex4"||t==="hex8"||t==="name");return i?t==="name"&&this._a===0?this.toName():this.toRgbString():(t==="rgb"&&(r=this.toRgbString()),t==="prgb"&&(r=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(r=this.toHexString()),t==="hex3"&&(r=this.toHexString(!0)),t==="hex4"&&(r=this.toHex8String(!0)),t==="hex8"&&(r=this.toHex8String()),t==="name"&&(r=this.toName()),t==="hsl"&&(r=this.toHslString()),t==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},clone:function(){return St(this.toString())},_applyModification:function(t,n){var r=t.apply(null,[this].concat([].slice.call(n)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(v7,arguments)},brighten:function(){return this._applyModification(y7,arguments)},darken:function(){return this._applyModification(b7,arguments)},desaturate:function(){return this._applyModification(p7,arguments)},saturate:function(){return this._applyModification(g7,arguments)},greyscale:function(){return this._applyModification(m7,arguments)},spin:function(){return this._applyModification(_7,arguments)},_applyCombination:function(t,n){return t.apply(null,[this].concat([].slice.call(n)))},analogous:function(){return this._applyCombination(C7,arguments)},complement:function(){return this._applyCombination(x7,arguments)},monochromatic:function(){return this._applyCombination(w7,arguments)},splitcomplement:function(){return this._applyCombination(E7,arguments)},triad:function(){return this._applyCombination(ux,[3])},tetrad:function(){return this._applyCombination(ux,[4])}};St.fromRatio=function(e,t){if(Tf(e)=="object"){var n={};for(var r in e)e.hasOwnProperty(r)&&(r==="a"?n[r]=e[r]:n[r]=mu(e[r]));e=n}return St(e,t)};function c7(e){var t={r:0,g:0,b:0},n=1,r=null,o=null,i=null,a=!1,l=!1;return typeof e=="string"&&(e=A7(e)),Tf(e)=="object"&&(Ui(e.r)&&Ui(e.g)&&Ui(e.b)?(t=u7(e.r,e.g,e.b),a=!0,l=String(e.r).substr(-1)==="%"?"prgb":"rgb"):Ui(e.h)&&Ui(e.s)&&Ui(e.v)?(r=mu(e.s),o=mu(e.v),t=f7(e.h,r,o),a=!0,l="hsv"):Ui(e.h)&&Ui(e.s)&&Ui(e.l)&&(r=mu(e.s),i=mu(e.l),t=d7(e.h,r,i),a=!0,l="hsl"),e.hasOwnProperty("a")&&(n=e.a)),n=NS(n),{ok:a,format:e.format||l,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}function u7(e,t,n){return{r:Dn(e,255)*255,g:Dn(t,255)*255,b:Dn(n,255)*255}}function ax(e,t,n){e=Dn(e,255),t=Dn(t,255),n=Dn(n,255);var r=Math.max(e,t,n),o=Math.min(e,t,n),i,a,l=(r+o)/2;if(r==o)i=a=0;else{var u=r-o;switch(a=l>.5?u/(2-r-o):u/(r+o),r){case e:i=(t-n)/u+(t<n?6:0);break;case t:i=(n-e)/u+2;break;case n:i=(e-t)/u+4;break}i/=6}return{h:i,s:a,l}}function d7(e,t,n){var r,o,i;e=Dn(e,360),t=Dn(t,100),n=Dn(n,100);function a(p,m,_){return _<0&&(_+=1),_>1&&(_-=1),_<1/6?p+(m-p)*6*_:_<1/2?m:_<2/3?p+(m-p)*(2/3-_)*6:p}if(t===0)r=o=i=n;else{var l=n<.5?n*(1+t):n+t-n*t,u=2*n-l;r=a(u,l,e+1/3),o=a(u,l,e),i=a(u,l,e-1/3)}return{r:r*255,g:o*255,b:i*255}}function sx(e,t,n){e=Dn(e,255),t=Dn(t,255),n=Dn(n,255);var r=Math.max(e,t,n),o=Math.min(e,t,n),i,a,l=r,u=r-o;if(a=r===0?0:u/r,r==o)i=0;else{switch(r){case e:i=(t-n)/u+(t<n?6:0);break;case t:i=(n-e)/u+2;break;case n:i=(e-t)/u+4;break}i/=6}return{h:i,s:a,v:l}}function f7(e,t,n){e=Dn(e,360)*6,t=Dn(t,100),n=Dn(n,100);var r=Math.floor(e),o=e-r,i=n*(1-t),a=n*(1-o*t),l=n*(1-(1-o)*t),u=r%6,p=[n,a,i,i,l,n][u],m=[l,n,n,a,i,i][u],_=[i,i,l,n,n,a][u];return{r:p*255,g:m*255,b:_*255}}function lx(e,t,n,r){var o=[Ho(Math.round(e).toString(16)),Ho(Math.round(t).toString(16)),Ho(Math.round(n).toString(16))];return r&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0):o.join("")}function h7(e,t,n,r,o){var i=[Ho(Math.round(e).toString(16)),Ho(Math.round(t).toString(16)),Ho(Math.round(n).toString(16)),Ho(TS(r))];return o&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)&&i[3].charAt(0)==i[3].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0)+i[3].charAt(0):i.join("")}function cx(e,t,n,r){var o=[Ho(TS(r)),Ho(Math.round(e).toString(16)),Ho(Math.round(t).toString(16)),Ho(Math.round(n).toString(16))];return o.join("")}St.equals=function(e,t){return!e||!t?!1:St(e).toRgbString()==St(t).toRgbString()};St.random=function(){return St.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function p7(e,t){t=t===0?0:t||10;var n=St(e).toHsl();return n.s-=t/100,n.s=oh(n.s),St(n)}function g7(e,t){t=t===0?0:t||10;var n=St(e).toHsl();return n.s+=t/100,n.s=oh(n.s),St(n)}function m7(e){return St(e).desaturate(100)}function v7(e,t){t=t===0?0:t||10;var n=St(e).toHsl();return n.l+=t/100,n.l=oh(n.l),St(n)}function y7(e,t){t=t===0?0:t||10;var n=St(e).toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(255*-(t/100)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(255*-(t/100)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(255*-(t/100)))),St(n)}function b7(e,t){t=t===0?0:t||10;var n=St(e).toHsl();return n.l-=t/100,n.l=oh(n.l),St(n)}function _7(e,t){var n=St(e).toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,St(n)}function x7(e){var t=St(e).toHsl();return t.h=(t.h+180)%360,St(t)}function ux(e,t){if(isNaN(t)||t<=0)throw new Error("Argument to polyad must be a positive number");for(var n=St(e).toHsl(),r=[St(e)],o=360/t,i=1;i<t;i++)r.push(St({h:(n.h+i*o)%360,s:n.s,l:n.l}));return r}function E7(e){var t=St(e).toHsl(),n=t.h;return[St(e),St({h:(n+72)%360,s:t.s,l:t.l}),St({h:(n+216)%360,s:t.s,l:t.l})]}function C7(e,t,n){t=t||6,n=n||30;var r=St(e).toHsl(),o=360/n,i=[St(e)];for(r.h=(r.h-(o*t>>1)+720)%360;--t;)r.h=(r.h+o)%360,i.push(St(r));return i}function w7(e,t){t=t||6;for(var n=St(e).toHsv(),r=n.h,o=n.s,i=n.v,a=[],l=1/t;t--;)a.push(St({h:r,s:o,v:i})),i=(i+l)%1;return a}St.mix=function(e,t,n){n=n===0?0:n||50;var r=St(e).toRgb(),o=St(t).toRgb(),i=n/100,a={r:(o.r-r.r)*i+r.r,g:(o.g-r.g)*i+r.g,b:(o.b-r.b)*i+r.b,a:(o.a-r.a)*i+r.a};return St(a)};St.readability=function(e,t){var n=St(e),r=St(t);return(Math.max(n.getLuminance(),r.getLuminance())+.05)/(Math.min(n.getLuminance(),r.getLuminance())+.05)};St.isReadable=function(e,t,n){var r=St.readability(e,t),o,i;switch(i=!1,o=R7(n),o.level+o.size){case"AAsmall":case"AAAlarge":i=r>=4.5;break;case"AAlarge":i=r>=3;break;case"AAAsmall":i=r>=7;break}return i};St.mostReadable=function(e,t,n){var r=null,o=0,i,a,l,u;n=n||{},a=n.includeFallbackColors,l=n.level,u=n.size;for(var p=0;p<t.length;p++)i=St.readability(e,t[p]),i>o&&(o=i,r=St(t[p]));return St.isReadable(e,r,{level:l,size:u})||!a?r:(n.includeFallbackColors=!1,St.mostReadable(e,["#fff","#000"],n))};var bg=St.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},N7=St.hexNames=T7(bg);function T7(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}function NS(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function Dn(e,t){S7(e)&&(e="100%");var n=O7(e);return e=Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(e*t,10)/100),Math.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function oh(e){return Math.min(1,Math.max(0,e))}function to(e){return parseInt(e,16)}function S7(e){return typeof e=="string"&&e.indexOf(".")!=-1&&parseFloat(e)===1}function O7(e){return typeof e=="string"&&e.indexOf("%")!=-1}function Ho(e){return e.length==1?"0"+e:""+e}function mu(e){return e<=1&&(e=e*100+"%"),e}function TS(e){return Math.round(parseFloat(e)*255).toString(16)}function dx(e){return to(e)/255}var Fo=function(){var e="[-\\+]?\\d+%?",t="[-\\+]?\\d*\\.\\d+%?",n="(?:"+t+")|(?:"+e+")",r="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?",o="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?";return{CSS_UNIT:new RegExp(n),rgb:new RegExp("rgb"+r),rgba:new RegExp("rgba"+o),hsl:new RegExp("hsl"+r),hsla:new RegExp("hsla"+o),hsv:new RegExp("hsv"+r),hsva:new RegExp("hsva"+o),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function Ui(e){return!!Fo.CSS_UNIT.exec(e)}function A7(e){e=e.replace(s7,"").replace(l7,"").toLowerCase();var t=!1;if(bg[e])e=bg[e],t=!0;else if(e=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n;return(n=Fo.rgb.exec(e))?{r:n[1],g:n[2],b:n[3]}:(n=Fo.rgba.exec(e))?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=Fo.hsl.exec(e))?{h:n[1],s:n[2],l:n[3]}:(n=Fo.hsla.exec(e))?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=Fo.hsv.exec(e))?{h:n[1],s:n[2],v:n[3]}:(n=Fo.hsva.exec(e))?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=Fo.hex8.exec(e))?{r:to(n[1]),g:to(n[2]),b:to(n[3]),a:dx(n[4]),format:t?"name":"hex8"}:(n=Fo.hex6.exec(e))?{r:to(n[1]),g:to(n[2]),b:to(n[3]),format:t?"name":"hex"}:(n=Fo.hex4.exec(e))?{r:to(n[1]+""+n[1]),g:to(n[2]+""+n[2]),b:to(n[3]+""+n[3]),a:dx(n[4]+""+n[4]),format:t?"name":"hex8"}:(n=Fo.hex3.exec(e))?{r:to(n[1]+""+n[1]),g:to(n[2]+""+n[2]),b:to(n[3]+""+n[3]),format:t?"name":"hex"}:!1}function R7(e){var t,n;return e=e||{level:"AA",size:"small"},t=(e.level||"AA").toUpperCase(),n=(e.size||"small").toLowerCase(),t!=="AA"&&t!=="AAA"&&(t="AA"),n!=="small"&&n!=="large"&&(n="small"),{level:t,size:n}}var fx=function(t){var n=["r","g","b","a","h","s","l","v"],r=0,o=0;return a7(n,function(i){if(t[i]&&(r+=1,isNaN(t[i])||(o+=1),i==="s"||i==="l")){var a=/^\d+%$/;a.test(t[i])&&(o+=1)}}),r===o?t:!1},vu=function(t,n){var r=t.hex?St(t.hex):St(t),o=r.toHsl(),i=r.toHsv(),a=r.toRgb(),l=r.toHex();o.s===0&&(o.h=n||0,i.h=n||0);var u=l==="000000"&&a.a===0;return{hsl:o,hex:u?"transparent":"#"+l,rgb:a,hsv:i,oldHue:t.h||n||o.h,source:t.source}},Ka=function(t){if(t==="transparent")return!0;var n=String(t).charAt(0)==="#"?1:0;return t.length!==4+n&&t.length<7+n&&St(t).isValid()},Ym=function(t){if(!t)return"#fff";var n=vu(t);if(n.hex==="transparent")return"rgba(0,0,0,0.4)";var r=(n.rgb.r*299+n.rgb.g*587+n.rgb.b*114)/1e3;return r>=128?"#000":"#fff"},Ap=function(t,n){var r=t.replace("°","");return St(n+" ("+r+")")._ok},hu=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$7=function(){function e(t,n){for(var r=0;r<n.length;r++){var o=n[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function D7(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function M7(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function k7(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var Gr=function(t){var n=function(r){k7(o,r);function o(i){D7(this,o);var a=M7(this,(o.__proto__||Object.getPrototypeOf(o)).call(this));return a.handleChange=function(l,u){var p=fx(l);if(p){var m=vu(l,l.h||a.state.oldHue);a.setState(m),a.props.onChangeComplete&&a.debounce(a.props.onChangeComplete,m,u),a.props.onChange&&a.props.onChange(m,u)}},a.handleSwatchHover=function(l,u){var p=fx(l);if(p){var m=vu(l,l.h||a.state.oldHue);a.props.onSwatchHover&&a.props.onSwatchHover(m,u)}},a.state=hu({},vu(i.color,0)),a.debounce=CS(function(l,u,p){l(u,p)},100),a}return $7(o,[{key:"render",value:function(){var a={};return this.props.onSwatchHover&&(a.onSwatchHover=this.handleSwatchHover),z.createElement(t,hu({},this.props,this.state,{onChange:this.handleChange},a))}}],[{key:"getDerivedStateFromProps",value:function(a,l){return hu({},vu(a.color,l.oldHue))}}]),o}(z.PureComponent||z.Component);return n.propTypes=hu({},t.propTypes),n.defaultProps=hu({},t.defaultProps,{color:{h:250,s:.5,l:.2,a:1}}),n},P7=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},I7=function(){function e(t,n){for(var r=0;r<n.length;r++){var o=n[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function L7(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function hx(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function F7(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var j7=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"span";return function(r){F7(o,r);function o(){var i,a,l,u;L7(this,o);for(var p=arguments.length,m=Array(p),_=0;_<p;_++)m[_]=arguments[_];return u=(a=(l=hx(this,(i=o.__proto__||Object.getPrototypeOf(o)).call.apply(i,[this].concat(m))),l),l.state={focus:!1},l.handleFocus=function(){return l.setState({focus:!0})},l.handleBlur=function(){return l.setState({focus:!1})},a),hx(l,u)}return I7(o,[{key:"render",value:function(){return z.createElement(n,{onFocus:this.handleFocus,onBlur:this.handleBlur},z.createElement(t,P7({},this.props,this.state)))}}]),o}(z.Component)},px=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},B7=13,H7=function(t){var n=t.color,r=t.style,o=t.onClick,i=o===void 0?function(){}:o,a=t.onHover,l=t.title,u=l===void 0?n:l,p=t.children,m=t.focus,_=t.focusStyle,v=_===void 0?{}:_,C=n==="transparent",b=jt({default:{swatch:px({background:n,height:"100%",width:"100%",cursor:"pointer",position:"relative",outline:"none"},r,m?v:{})}}),y=function(I){return i(n,I)},N=function(I){return I.keyCode===B7&&i(n,I)},R=function(I){return a(n,I)},O={};return a&&(O.onMouseOver=R),z.createElement("div",px({style:b.swatch,onClick:y,title:u,tabIndex:0,onKeyDown:N},O),p,C&&z.createElement(hc,{borderRadius:b.swatch.borderRadius,boxShadow:"inset 0 0 0 1px rgba(0,0,0,0.1)"}))};const ks=j7(H7);var W7=function(t){var n=t.direction,r=jt({default:{picker:{width:"18px",height:"18px",borderRadius:"50%",transform:"translate(-9px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}},vertical:{picker:{transform:"translate(-3px, -9px)"}}},{vertical:n==="vertical"});return z.createElement("div",{style:r.picker})},z7=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},SS=function(t){var n=t.rgb,r=t.hsl,o=t.width,i=t.height,a=t.onChange,l=t.direction,u=t.style,p=t.renderers,m=t.pointer,_=t.className,v=_===void 0?"":_,C=jt({default:{picker:{position:"relative",width:o,height:i},alpha:{radius:"2px",style:u}}});return z.createElement("div",{style:C.picker,className:"alpha-picker "+v},z.createElement(jm,z7({},C.alpha,{rgb:n,hsl:r,pointer:m,renderers:p,onChange:a,direction:l})))};SS.defaultProps={width:"316px",height:"16px",direction:"horizontal",pointer:W7};Gr(SS);function OS(e,t){for(var n=-1,r=e==null?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}var K7="__lodash_hash_undefined__";function G7(e){return this.__data__.set(e,K7),this}function U7(e){return this.__data__.has(e)}function Sf(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new ra;++t<n;)this.add(e[t])}Sf.prototype.add=Sf.prototype.push=G7;Sf.prototype.has=U7;function V7(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function Y7(e,t){return e.has(t)}var q7=1,Z7=2;function AS(e,t,n,r,o,i){var a=n&q7,l=e.length,u=t.length;if(l!=u&&!(a&&u>l))return!1;var p=i.get(e),m=i.get(t);if(p&&m)return p==t&&m==e;var _=-1,v=!0,C=n&Z7?new Sf:void 0;for(i.set(e,t),i.set(t,e);++_<l;){var b=e[_],y=t[_];if(r)var N=a?r(y,b,_,t,e,i):r(b,y,_,e,t,i);if(N!==void 0){if(N)continue;v=!1;break}if(C){if(!V7(t,function(R,O){if(!Y7(C,O)&&(b===R||o(b,R,n,r,i)))return C.push(O)})){v=!1;break}}else if(!(b===y||o(b,y,n,r,i))){v=!1;break}}return i.delete(e),i.delete(t),v}function J7(e){var t=-1,n=Array(e.size);return e.forEach(function(r,o){n[++t]=[o,r]}),n}function X7(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var Q7=1,eq=2,tq="[object Boolean]",nq="[object Date]",rq="[object Error]",oq="[object Map]",iq="[object Number]",aq="[object RegExp]",sq="[object Set]",lq="[object String]",cq="[object Symbol]",uq="[object ArrayBuffer]",dq="[object DataView]",gx=ja?ja.prototype:void 0,Rp=gx?gx.valueOf:void 0;function fq(e,t,n,r,o,i,a){switch(n){case dq:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case uq:return!(e.byteLength!=t.byteLength||!i(new Cf(e),new Cf(t)));case tq:case nq:case iq:return Zu(+e,+t);case rq:return e.name==t.name&&e.message==t.message;case aq:case lq:return e==t+"";case oq:var l=J7;case sq:var u=r&Q7;if(l||(l=X7),e.size!=t.size&&!u)return!1;var p=a.get(e);if(p)return p==t;r|=eq,a.set(e,t);var m=AS(l(e),l(t),r,o,i,a);return a.delete(e),m;case cq:if(Rp)return Rp.call(e)==Rp.call(t)}return!1}function hq(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}function pq(e,t,n){var r=t(e);return so(e)?r:hq(r,n(e))}function gq(e,t){for(var n=-1,r=e==null?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a,n,e)&&(i[o++]=a)}return i}function mq(){return[]}var vq=Object.prototype,yq=vq.propertyIsEnumerable,mx=Object.getOwnPropertySymbols,bq=mx?function(e){return e==null?[]:(e=Object(e),gq(mx(e),function(t){return yq.call(e,t)}))}:mq;function vx(e){return pq(e,Vm,bq)}var _q=1,xq=Object.prototype,Eq=xq.hasOwnProperty;function Cq(e,t,n,r,o,i){var a=n&_q,l=vx(e),u=l.length,p=vx(t),m=p.length;if(u!=m&&!a)return!1;for(var _=u;_--;){var v=l[_];if(!(a?v in t:Eq.call(t,v)))return!1}var C=i.get(e),b=i.get(t);if(C&&b)return C==t&&b==e;var y=!0;i.set(e,t),i.set(t,e);for(var N=a;++_<u;){v=l[_];var R=e[v],O=t[v];if(r)var k=a?r(O,R,v,t,e,i):r(R,O,v,e,t,i);if(!(k===void 0?R===O||o(R,O,n,r,i):k)){y=!1;break}N||(N=v=="constructor")}if(y&&!N){var I=e.constructor,M=t.constructor;I!=M&&"constructor"in e&&"constructor"in t&&!(typeof I=="function"&&I instanceof I&&typeof M=="function"&&M instanceof M)&&(y=!1)}return i.delete(e),i.delete(t),y}var _g=Ms(qo,"DataView"),xg=Ms(qo,"Promise"),Eg=Ms(qo,"Set"),Cg=Ms(qo,"WeakMap"),yx="[object Map]",wq="[object Object]",bx="[object Promise]",_x="[object Set]",xx="[object WeakMap]",Ex="[object DataView]",Nq=Ds(_g),Tq=Ds(Ou),Sq=Ds(xg),Oq=Ds(Eg),Aq=Ds(Cg),Da=$s;(_g&&Da(new _g(new ArrayBuffer(1)))!=Ex||Ou&&Da(new Ou)!=yx||xg&&Da(xg.resolve())!=bx||Eg&&Da(new Eg)!=_x||Cg&&Da(new Cg)!=xx)&&(Da=function(e){var t=$s(e),n=t==wq?e.constructor:void 0,r=n?Ds(n):"";if(r)switch(r){case Nq:return Ex;case Tq:return yx;case Sq:return bx;case Oq:return _x;case Aq:return xx}return t});var Rq=1,Cx="[object Arguments]",wx="[object Array]",Yd="[object Object]",$q=Object.prototype,Nx=$q.hasOwnProperty;function Dq(e,t,n,r,o,i){var a=so(e),l=so(t),u=a?wx:Da(e),p=l?wx:Da(t);u=u==Cx?Yd:u,p=p==Cx?Yd:p;var m=u==Yd,_=p==Yd,v=u==p;if(v&&Nf(e)){if(!Nf(t))return!1;a=!0,m=!1}if(v&&!m)return i||(i=new bi),a||Gm(e)?AS(e,t,n,r,o,i):fq(e,t,u,n,r,o,i);if(!(n&Rq)){var C=m&&Nx.call(e,"__wrapped__"),b=_&&Nx.call(t,"__wrapped__");if(C||b){var y=C?e.value():e,N=b?t.value():t;return i||(i=new bi),o(y,N,n,r,i)}}return v?(i||(i=new bi),Cq(e,t,n,r,o,i)):!1}function qm(e,t,n,r,o){return e===t?!0:e==null||t==null||!Ba(e)&&!Ba(t)?e!==e&&t!==t:Dq(e,t,n,r,qm,o)}var Mq=1,kq=2;function Pq(e,t,n,r){var o=n.length,i=o;if(e==null)return!i;for(e=Object(e);o--;){var a=n[o];if(a[2]?a[1]!==e[a[0]]:!(a[0]in e))return!1}for(;++o<i;){a=n[o];var l=a[0],u=e[l],p=a[1];if(a[2]){if(u===void 0&&!(l in e))return!1}else{var m=new bi,_;if(!(_===void 0?qm(p,u,Mq|kq,r,m):_))return!1}}return!0}function RS(e){return e===e&&!xo(e)}function Iq(e){for(var t=Vm(e),n=t.length;n--;){var r=t[n],o=e[r];t[n]=[r,o,RS(o)]}return t}function $S(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}function Lq(e){var t=Iq(e);return t.length==1&&t[0][2]?$S(t[0][0],t[0][1]):function(n){return n===e||Pq(n,e,t)}}var Fq=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,jq=/^\w*$/;function Zm(e,t){if(so(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||nh(e)?!0:jq.test(e)||!Fq.test(e)||t!=null&&e in Object(t)}var Bq="Expected a function";function Jm(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(Bq);var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=e.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(Jm.Cache||ra),n}Jm.Cache=ra;var Hq=500;function Wq(e){var t=Jm(e,function(r){return n.size===Hq&&n.clear(),r}),n=t.cache;return t}var zq=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Kq=/\\(\\)?/g,Gq=Wq(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(zq,function(n,r,o,i){t.push(o?i.replace(Kq,"$1"):r||n)}),t}),Uq=1/0,Tx=ja?ja.prototype:void 0,Sx=Tx?Tx.toString:void 0;function DS(e){if(typeof e=="string")return e;if(so(e))return OS(e,DS)+"";if(nh(e))return Sx?Sx.call(e):"";var t=e+"";return t=="0"&&1/e==-Uq?"-0":t}function Vq(e){return e==null?"":DS(e)}function MS(e,t){return so(e)?e:Zm(e,t)?[e]:Gq(Vq(e))}var Yq=1/0;function ih(e){if(typeof e=="string"||nh(e))return e;var t=e+"";return t=="0"&&1/e==-Yq?"-0":t}function kS(e,t){t=MS(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[ih(t[n++])];return n&&n==r?e:void 0}function qq(e,t,n){var r=e==null?void 0:kS(e,t);return r===void 0?n:r}function Zq(e,t){return e!=null&&t in Object(e)}function Jq(e,t,n){t=MS(t,e);for(var r=-1,o=t.length,i=!1;++r<o;){var a=ih(t[r]);if(!(i=e!=null&&n(e,a)))break;e=e[a]}return i||++r!=o?i:(o=e==null?0:e.length,!!o&&Km(o)&&Um(a,o)&&(so(e)||wf(e)))}function Xq(e,t){return e!=null&&Jq(e,t,Zq)}var Qq=1,eZ=2;function tZ(e,t){return Zm(e)&&RS(t)?$S(ih(e),t):function(n){var r=qq(n,e);return r===void 0&&r===t?Xq(n,e):qm(t,r,Qq|eZ)}}function nZ(e){return function(t){return t==null?void 0:t[e]}}function rZ(e){return function(t){return kS(t,e)}}function oZ(e){return Zm(e)?nZ(ih(e)):rZ(e)}function iZ(e){return typeof e=="function"?e:e==null?th:typeof e=="object"?so(e)?tZ(e[0],e[1]):Lq(e):oZ(e)}function aZ(e,t){var n=-1,r=gc(e)?Array(e.length):[];return wS(e,function(o,i,a){r[++n]=t(o,i,a)}),r}function Ps(e,t){var n=so(e)?OS:aZ;return n(e,iZ(t))}var sZ=function(t){var n=t.colors,r=t.onClick,o=t.onSwatchHover,i=jt({default:{swatches:{marginRight:"-10px"},swatch:{width:"22px",height:"22px",float:"left",marginRight:"10px",marginBottom:"10px",borderRadius:"4px"},clear:{clear:"both"}}});return z.createElement("div",{style:i.swatches},Ps(n,function(a){return z.createElement(ks,{key:a,color:a,style:i.swatch,onClick:r,onHover:o,focusStyle:{boxShadow:"0 0 4px "+a}})}),z.createElement("div",{style:i.clear}))},Xm=function(t){var n=t.onChange,r=t.onSwatchHover,o=t.hex,i=t.colors,a=t.width,l=t.triangle,u=t.styles,p=u===void 0?{}:u,m=t.className,_=m===void 0?"":m,v=o==="transparent",C=function(N,R){Ka(N)&&n({hex:N,source:"hex"},R)},b=jt(Kr({default:{card:{width:a,background:"#fff",boxShadow:"0 1px rgba(0,0,0,.1)",borderRadius:"6px",position:"relative"},head:{height:"110px",background:o,borderRadius:"6px 6px 0 0",display:"flex",alignItems:"center",justifyContent:"center",position:"relative"},body:{padding:"10px"},label:{fontSize:"18px",color:Ym(o),position:"relative"},triangle:{width:"0px",height:"0px",borderStyle:"solid",borderWidth:"0 10px 10px 10px",borderColor:"transparent transparent "+o+" transparent",position:"absolute",top:"-10px",left:"50%",marginLeft:"-10px"},input:{width:"100%",fontSize:"12px",color:"#666",border:"0px",outline:"none",height:"22px",boxShadow:"inset 0 0 0 1px #ddd",borderRadius:"4px",padding:"0 7px",boxSizing:"border-box"}},"hide-triangle":{triangle:{display:"none"}}},p),{"hide-triangle":l==="hide"});return z.createElement("div",{style:b.card,className:"block-picker "+_},z.createElement("div",{style:b.triangle}),z.createElement("div",{style:b.head},v&&z.createElement(hc,{borderRadius:"6px 6px 0 0"}),z.createElement("div",{style:b.label},o)),z.createElement("div",{style:b.body},z.createElement(sZ,{colors:i,onClick:C,onSwatchHover:r}),z.createElement(en,{style:{input:b.input},value:o,onChange:C})))};Xm.propTypes={width:ut.oneOfType([ut.string,ut.number]),colors:ut.arrayOf(ut.string),triangle:ut.oneOf(["top","hide"]),styles:ut.object};Xm.defaultProps={width:170,colors:["#D9E3F0","#F47373","#697689","#37D67A","#2CCCE4","#555555","#dce775","#ff8a65","#ba68c8"],triangle:"top",styles:{}};Gr(Xm);var xl={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",a100:"#ff8a80",a200:"#ff5252",a400:"#ff1744",a700:"#d50000"},El={50:"#fce4ec",100:"#f8bbd0",200:"#f48fb1",300:"#f06292",400:"#ec407a",500:"#e91e63",600:"#d81b60",700:"#c2185b",800:"#ad1457",900:"#880e4f",a100:"#ff80ab",a200:"#ff4081",a400:"#f50057",a700:"#c51162"},Cl={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",a100:"#ea80fc",a200:"#e040fb",a400:"#d500f9",a700:"#aa00ff"},wl={50:"#ede7f6",100:"#d1c4e9",200:"#b39ddb",300:"#9575cd",400:"#7e57c2",500:"#673ab7",600:"#5e35b1",700:"#512da8",800:"#4527a0",900:"#311b92",a100:"#b388ff",a200:"#7c4dff",a400:"#651fff",a700:"#6200ea"},Nl={50:"#e8eaf6",100:"#c5cae9",200:"#9fa8da",300:"#7986cb",400:"#5c6bc0",500:"#3f51b5",600:"#3949ab",700:"#303f9f",800:"#283593",900:"#1a237e",a100:"#8c9eff",a200:"#536dfe",a400:"#3d5afe",a700:"#304ffe"},Tl={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",a100:"#82b1ff",a200:"#448aff",a400:"#2979ff",a700:"#2962ff"},Sl={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",a100:"#80d8ff",a200:"#40c4ff",a400:"#00b0ff",a700:"#0091ea"},Ol={50:"#e0f7fa",100:"#b2ebf2",200:"#80deea",300:"#4dd0e1",400:"#26c6da",500:"#00bcd4",600:"#00acc1",700:"#0097a7",800:"#00838f",900:"#006064",a100:"#84ffff",a200:"#18ffff",a400:"#00e5ff",a700:"#00b8d4"},Al={50:"#e0f2f1",100:"#b2dfdb",200:"#80cbc4",300:"#4db6ac",400:"#26a69a",500:"#009688",600:"#00897b",700:"#00796b",800:"#00695c",900:"#004d40",a100:"#a7ffeb",a200:"#64ffda",a400:"#1de9b6",a700:"#00bfa5"},yu={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",a100:"#b9f6ca",a200:"#69f0ae",a400:"#00e676",a700:"#00c853"},Rl={50:"#f1f8e9",100:"#dcedc8",200:"#c5e1a5",300:"#aed581",400:"#9ccc65",500:"#8bc34a",600:"#7cb342",700:"#689f38",800:"#558b2f",900:"#33691e",a100:"#ccff90",a200:"#b2ff59",a400:"#76ff03",a700:"#64dd17"},$l={50:"#f9fbe7",100:"#f0f4c3",200:"#e6ee9c",300:"#dce775",400:"#d4e157",500:"#cddc39",600:"#c0ca33",700:"#afb42b",800:"#9e9d24",900:"#827717",a100:"#f4ff81",a200:"#eeff41",a400:"#c6ff00",a700:"#aeea00"},Dl={50:"#fffde7",100:"#fff9c4",200:"#fff59d",300:"#fff176",400:"#ffee58",500:"#ffeb3b",600:"#fdd835",700:"#fbc02d",800:"#f9a825",900:"#f57f17",a100:"#ffff8d",a200:"#ffff00",a400:"#ffea00",a700:"#ffd600"},Ml={50:"#fff8e1",100:"#ffecb3",200:"#ffe082",300:"#ffd54f",400:"#ffca28",500:"#ffc107",600:"#ffb300",700:"#ffa000",800:"#ff8f00",900:"#ff6f00",a100:"#ffe57f",a200:"#ffd740",a400:"#ffc400",a700:"#ffab00"},kl={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",a100:"#ffd180",a200:"#ffab40",a400:"#ff9100",a700:"#ff6d00"},Pl={50:"#fbe9e7",100:"#ffccbc",200:"#ffab91",300:"#ff8a65",400:"#ff7043",500:"#ff5722",600:"#f4511e",700:"#e64a19",800:"#d84315",900:"#bf360c",a100:"#ff9e80",a200:"#ff6e40",a400:"#ff3d00",a700:"#dd2c00"},Il={50:"#efebe9",100:"#d7ccc8",200:"#bcaaa4",300:"#a1887f",400:"#8d6e63",500:"#795548",600:"#6d4c41",700:"#5d4037",800:"#4e342e",900:"#3e2723"},Ll={50:"#eceff1",100:"#cfd8dc",200:"#b0bec5",300:"#90a4ae",400:"#78909c",500:"#607d8b",600:"#546e7a",700:"#455a64",800:"#37474f",900:"#263238"},PS=function(t){var n=t.color,r=t.onClick,o=t.onSwatchHover,i=t.hover,a=t.active,l=t.circleSize,u=t.circleSpacing,p=jt({default:{swatch:{width:l,height:l,marginRight:u,marginBottom:u,transform:"scale(1)",transition:"100ms transform ease"},Swatch:{borderRadius:"50%",background:"transparent",boxShadow:"inset 0 0 0 "+(l/2+1)+"px "+n,transition:"100ms box-shadow ease"}},hover:{swatch:{transform:"scale(1.2)"}},active:{Swatch:{boxShadow:"inset 0 0 0 3px "+n}}},{hover:i,active:a});return z.createElement("div",{style:p.swatch},z.createElement(ks,{style:p.Swatch,color:n,onClick:r,onHover:o,focusStyle:{boxShadow:p.Swatch.boxShadow+", 0 0 5px "+n}}))};PS.defaultProps={circleSize:28,circleSpacing:14};const lZ=Fm(PS);var Qm=function(t){var n=t.width,r=t.onChange,o=t.onSwatchHover,i=t.colors,a=t.hex,l=t.circleSize,u=t.styles,p=u===void 0?{}:u,m=t.circleSpacing,_=t.className,v=_===void 0?"":_,C=jt(Kr({default:{card:{width:n,display:"flex",flexWrap:"wrap",marginRight:-m,marginBottom:-m}}},p)),b=function(N,R){return r({hex:N,source:"hex"},R)};return z.createElement("div",{style:C.card,className:"circle-picker "+v},Ps(i,function(y){return z.createElement(lZ,{key:y,color:y,onClick:b,onSwatchHover:o,active:a===y.toLowerCase(),circleSize:l,circleSpacing:m})}))};Qm.propTypes={width:ut.oneOfType([ut.string,ut.number]),circleSize:ut.number,circleSpacing:ut.number,styles:ut.object};Qm.defaultProps={width:252,circleSize:28,circleSpacing:14,colors:[xl[500],El[500],Cl[500],wl[500],Nl[500],Tl[500],Sl[500],Ol[500],Al[500],yu[500],Rl[500],$l[500],Dl[500],Ml[500],kl[500],Pl[500],Il[500],Ll[500]],styles:{}};Gr(Qm);function Ox(e){return e===void 0}var IS={};Object.defineProperty(IS,"__esModule",{value:!0});var Ax=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},cZ=z,Rx=uZ(cZ);function uZ(e){return e&&e.__esModule?e:{default:e}}function dZ(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}var qd=24,fZ=IS.default=function(e){var t=e.fill,n=t===void 0?"currentColor":t,r=e.width,o=r===void 0?qd:r,i=e.height,a=i===void 0?qd:i,l=e.style,u=l===void 0?{}:l,p=dZ(e,["fill","width","height","style"]);return Rx.default.createElement("svg",Ax({viewBox:"0 0 "+qd+" "+qd,style:Ax({fill:n,width:o,height:a},u)},p),Rx.default.createElement("path",{d:"M12,18.17L8.83,15L7.42,16.41L12,21L16.59,16.41L15.17,15M12,5.83L15.17,9L16.58,7.59L12,3L7.41,7.59L8.83,9L12,5.83Z"}))},hZ=function(){function e(t,n){for(var r=0;r<n.length;r++){var o=n[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function pZ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function gZ(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function mZ(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var LS=function(e){mZ(t,e);function t(n){pZ(this,t);var r=gZ(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return r.toggleViews=function(){r.state.view==="hex"?r.setState({view:"rgb"}):r.state.view==="rgb"?r.setState({view:"hsl"}):r.state.view==="hsl"&&(r.props.hsl.a===1?r.setState({view:"hex"}):r.setState({view:"rgb"}))},r.handleChange=function(o,i){o.hex?Ka(o.hex)&&r.props.onChange({hex:o.hex,source:"hex"},i):o.r||o.g||o.b?r.props.onChange({r:o.r||r.props.rgb.r,g:o.g||r.props.rgb.g,b:o.b||r.props.rgb.b,source:"rgb"},i):o.a?(o.a<0?o.a=0:o.a>1&&(o.a=1),r.props.onChange({h:r.props.hsl.h,s:r.props.hsl.s,l:r.props.hsl.l,a:Math.round(o.a*100)/100,source:"rgb"},i)):(o.h||o.s||o.l)&&(typeof o.s=="string"&&o.s.includes("%")&&(o.s=o.s.replace("%","")),typeof o.l=="string"&&o.l.includes("%")&&(o.l=o.l.replace("%","")),o.s==1?o.s=.01:o.l==1&&(o.l=.01),r.props.onChange({h:o.h||r.props.hsl.h,s:Number(Ox(o.s)?r.props.hsl.s:o.s),l:Number(Ox(o.l)?r.props.hsl.l:o.l),source:"hsl"},i))},r.showHighlight=function(o){o.currentTarget.style.background="#eee"},r.hideHighlight=function(o){o.currentTarget.style.background="transparent"},n.hsl.a!==1&&n.view==="hex"?r.state={view:"rgb"}:r.state={view:n.view},r}return hZ(t,[{key:"render",value:function(){var r=this,o=jt({default:{wrap:{paddingTop:"16px",display:"flex"},fields:{flex:"1",display:"flex",marginLeft:"-6px"},field:{paddingLeft:"6px",width:"100%"},alpha:{paddingLeft:"6px",width:"100%"},toggle:{width:"32px",textAlign:"right",position:"relative"},icon:{marginRight:"-4px",marginTop:"12px",cursor:"pointer",position:"relative"},iconHighlight:{position:"absolute",width:"24px",height:"28px",background:"#eee",borderRadius:"4px",top:"10px",left:"12px",display:"none"},input:{fontSize:"11px",color:"#333",width:"100%",borderRadius:"2px",border:"none",boxShadow:"inset 0 0 0 1px #dadada",height:"21px",textAlign:"center"},label:{textTransform:"uppercase",fontSize:"11px",lineHeight:"11px",color:"#969696",textAlign:"center",display:"block",marginTop:"12px"},svg:{fill:"#333",width:"24px",height:"24px",border:"1px transparent solid",borderRadius:"5px"}},disableAlpha:{alpha:{display:"none"}}},this.props,this.state),i=void 0;return this.state.view==="hex"?i=z.createElement("div",{style:o.fields,className:"flexbox-fix"},z.createElement("div",{style:o.field},z.createElement(en,{style:{input:o.input,label:o.label},label:"hex",value:this.props.hex,onChange:this.handleChange}))):this.state.view==="rgb"?i=z.createElement("div",{style:o.fields,className:"flexbox-fix"},z.createElement("div",{style:o.field},z.createElement(en,{style:{input:o.input,label:o.label},label:"r",value:this.props.rgb.r,onChange:this.handleChange})),z.createElement("div",{style:o.field},z.createElement(en,{style:{input:o.input,label:o.label},label:"g",value:this.props.rgb.g,onChange:this.handleChange})),z.createElement("div",{style:o.field},z.createElement(en,{style:{input:o.input,label:o.label},label:"b",value:this.props.rgb.b,onChange:this.handleChange})),z.createElement("div",{style:o.alpha},z.createElement(en,{style:{input:o.input,label:o.label},label:"a",value:this.props.rgb.a,arrowOffset:.01,onChange:this.handleChange}))):this.state.view==="hsl"&&(i=z.createElement("div",{style:o.fields,className:"flexbox-fix"},z.createElement("div",{style:o.field},z.createElement(en,{style:{input:o.input,label:o.label},label:"h",value:Math.round(this.props.hsl.h),onChange:this.handleChange})),z.createElement("div",{style:o.field},z.createElement(en,{style:{input:o.input,label:o.label},label:"s",value:Math.round(this.props.hsl.s*100)+"%",onChange:this.handleChange})),z.createElement("div",{style:o.field},z.createElement(en,{style:{input:o.input,label:o.label},label:"l",value:Math.round(this.props.hsl.l*100)+"%",onChange:this.handleChange})),z.createElement("div",{style:o.alpha},z.createElement(en,{style:{input:o.input,label:o.label},label:"a",value:this.props.hsl.a,arrowOffset:.01,onChange:this.handleChange})))),z.createElement("div",{style:o.wrap,className:"flexbox-fix"},i,z.createElement("div",{style:o.toggle},z.createElement("div",{style:o.icon,onClick:this.toggleViews,ref:function(l){return r.icon=l}},z.createElement(fZ,{style:o.svg,onMouseOver:this.showHighlight,onMouseEnter:this.showHighlight,onMouseOut:this.hideHighlight}))))}}],[{key:"getDerivedStateFromProps",value:function(r,o){return r.hsl.a!==1&&o.view==="hex"?{view:"rgb"}:null}}]),t}(z.Component);LS.defaultProps={view:"hex"};var $x=function(){var t=jt({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",transform:"translate(-6px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}}});return z.createElement("div",{style:t.picker})},vZ=function(){var t=jt({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",boxShadow:"inset 0 0 0 1px #fff",transform:"translate(-6px, -6px)"}}});return z.createElement("div",{style:t.picker})},ev=function(t){var n=t.width,r=t.onChange,o=t.disableAlpha,i=t.rgb,a=t.hsl,l=t.hsv,u=t.hex,p=t.renderers,m=t.styles,_=m===void 0?{}:m,v=t.className,C=v===void 0?"":v,b=t.defaultView,y=jt(Kr({default:{picker:{width:n,background:"#fff",borderRadius:"2px",boxShadow:"0 0 2px rgba(0,0,0,.3), 0 4px 8px rgba(0,0,0,.3)",boxSizing:"initial",fontFamily:"Menlo"},saturation:{width:"100%",paddingBottom:"55%",position:"relative",borderRadius:"2px 2px 0 0",overflow:"hidden"},Saturation:{radius:"2px 2px 0 0"},body:{padding:"16px 16px 12px"},controls:{display:"flex"},color:{width:"32px"},swatch:{marginTop:"6px",width:"16px",height:"16px",borderRadius:"8px",position:"relative",overflow:"hidden"},active:{absolute:"0px 0px 0px 0px",borderRadius:"8px",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.1)",background:"rgba("+i.r+", "+i.g+", "+i.b+", "+i.a+")",zIndex:"2"},toggles:{flex:"1"},hue:{height:"10px",position:"relative",marginBottom:"8px"},Hue:{radius:"2px"},alpha:{height:"10px",position:"relative"},Alpha:{radius:"2px"}},disableAlpha:{color:{width:"22px"},alpha:{display:"none"},hue:{marginBottom:"0px"},swatch:{width:"10px",height:"10px",marginTop:"0px"}}},_),{disableAlpha:o});return z.createElement("div",{style:y.picker,className:"chrome-picker "+C},z.createElement("div",{style:y.saturation},z.createElement(rh,{style:y.Saturation,hsl:a,hsv:l,pointer:vZ,onChange:r})),z.createElement("div",{style:y.body},z.createElement("div",{style:y.controls,className:"flexbox-fix"},z.createElement("div",{style:y.color},z.createElement("div",{style:y.swatch},z.createElement("div",{style:y.active}),z.createElement(hc,{renderers:p}))),z.createElement("div",{style:y.toggles},z.createElement("div",{style:y.hue},z.createElement(pc,{style:y.Hue,hsl:a,pointer:$x,onChange:r})),z.createElement("div",{style:y.alpha},z.createElement(jm,{style:y.Alpha,rgb:i,hsl:a,pointer:$x,renderers:p,onChange:r})))),z.createElement(LS,{rgb:i,hsl:a,hex:u,view:b,onChange:r,disableAlpha:o})))};ev.propTypes={width:ut.oneOfType([ut.string,ut.number]),disableAlpha:ut.bool,styles:ut.object,defaultView:ut.oneOf(["hex","rgb","hsl"])};ev.defaultProps={width:225,disableAlpha:!1,styles:{}};Gr(ev);var yZ=function(t){var n=t.color,r=t.onClick,o=r===void 0?function(){}:r,i=t.onSwatchHover,a=t.active,l=jt({default:{color:{background:n,width:"15px",height:"15px",float:"left",marginRight:"5px",marginBottom:"5px",position:"relative",cursor:"pointer"},dot:{absolute:"5px 5px 5px 5px",background:Ym(n),borderRadius:"50%",opacity:"0"}},active:{dot:{opacity:"1"}},"color-#FFFFFF":{color:{boxShadow:"inset 0 0 0 1px #ddd"},dot:{background:"#000"}},transparent:{dot:{background:"#000"}}},{active:a,"color-#FFFFFF":n==="#FFFFFF",transparent:n==="transparent"});return z.createElement(ks,{style:l.color,color:n,onClick:o,onHover:i,focusStyle:{boxShadow:"0 0 4px "+n}},z.createElement("div",{style:l.dot}))},bZ=function(t){var n=t.hex,r=t.rgb,o=t.onChange,i=jt({default:{fields:{display:"flex",paddingBottom:"6px",paddingRight:"5px",position:"relative"},active:{position:"absolute",top:"6px",left:"5px",height:"9px",width:"9px",background:n},HEXwrap:{flex:"6",position:"relative"},HEXinput:{width:"80%",padding:"0px",paddingLeft:"20%",border:"none",outline:"none",background:"none",fontSize:"12px",color:"#333",height:"16px"},HEXlabel:{display:"none"},RGBwrap:{flex:"3",position:"relative"},RGBinput:{width:"70%",padding:"0px",paddingLeft:"30%",border:"none",outline:"none",background:"none",fontSize:"12px",color:"#333",height:"16px"},RGBlabel:{position:"absolute",top:"3px",left:"0px",lineHeight:"16px",textTransform:"uppercase",fontSize:"12px",color:"#999"}}}),a=function(u,p){u.r||u.g||u.b?o({r:u.r||r.r,g:u.g||r.g,b:u.b||r.b,source:"rgb"},p):o({hex:u.hex,source:"hex"},p)};return z.createElement("div",{style:i.fields,className:"flexbox-fix"},z.createElement("div",{style:i.active}),z.createElement(en,{style:{wrap:i.HEXwrap,input:i.HEXinput,label:i.HEXlabel},label:"hex",value:n,onChange:a}),z.createElement(en,{style:{wrap:i.RGBwrap,input:i.RGBinput,label:i.RGBlabel},label:"r",value:r.r,onChange:a}),z.createElement(en,{style:{wrap:i.RGBwrap,input:i.RGBinput,label:i.RGBlabel},label:"g",value:r.g,onChange:a}),z.createElement(en,{style:{wrap:i.RGBwrap,input:i.RGBinput,label:i.RGBlabel},label:"b",value:r.b,onChange:a}))},tv=function(t){var n=t.onChange,r=t.onSwatchHover,o=t.colors,i=t.hex,a=t.rgb,l=t.styles,u=l===void 0?{}:l,p=t.className,m=p===void 0?"":p,_=jt(Kr({default:{Compact:{background:"#f6f6f6",radius:"4px"},compact:{paddingTop:"5px",paddingLeft:"5px",boxSizing:"initial",width:"240px"},clear:{clear:"both"}}},u)),v=function(b,y){b.hex?Ka(b.hex)&&n({hex:b.hex,source:"hex"},y):n(b,y)};return z.createElement(Ju,{style:_.Compact,styles:u},z.createElement("div",{style:_.compact,className:"compact-picker "+m},z.createElement("div",null,Ps(o,function(C){return z.createElement(yZ,{key:C,color:C,active:C.toLowerCase()===i,onClick:v,onSwatchHover:r})}),z.createElement("div",{style:_.clear})),z.createElement(bZ,{hex:i,rgb:a,onChange:v})))};tv.propTypes={colors:ut.arrayOf(ut.string),styles:ut.object};tv.defaultProps={colors:["#4D4D4D","#999999","#FFFFFF","#F44E3B","#FE9200","#FCDC00","#DBDF00","#A4DD00","#68CCCA","#73D8FF","#AEA1FF","#FDA1FF","#333333","#808080","#cccccc","#D33115","#E27300","#FCC400","#B0BC00","#68BC00","#16A5A5","#009CE0","#7B64FF","#FA28FF","#000000","#666666","#B3B3B3","#9F0500","#C45100","#FB9E00","#808900","#194D33","#0C797D","#0062B1","#653294","#AB149E"],styles:{}};Gr(tv);var _Z=function(t){var n=t.hover,r=t.color,o=t.onClick,i=t.onSwatchHover,a={position:"relative",zIndex:"2",outline:"2px solid #fff",boxShadow:"0 0 5px 2px rgba(0,0,0,0.25)"},l=jt({default:{swatch:{width:"25px",height:"25px",fontSize:"0"}},hover:{swatch:a}},{hover:n});return z.createElement("div",{style:l.swatch},z.createElement(ks,{color:r,onClick:o,onHover:i,focusStyle:a}))};const xZ=Fm(_Z);var nv=function(t){var n=t.width,r=t.colors,o=t.onChange,i=t.onSwatchHover,a=t.triangle,l=t.styles,u=l===void 0?{}:l,p=t.className,m=p===void 0?"":p,_=jt(Kr({default:{card:{width:n,background:"#fff",border:"1px solid rgba(0,0,0,0.2)",boxShadow:"0 3px 12px rgba(0,0,0,0.15)",borderRadius:"4px",position:"relative",padding:"5px",display:"flex",flexWrap:"wrap"},triangle:{position:"absolute",border:"7px solid transparent",borderBottomColor:"#fff"},triangleShadow:{position:"absolute",border:"8px solid transparent",borderBottomColor:"rgba(0,0,0,0.15)"}},"hide-triangle":{triangle:{display:"none"},triangleShadow:{display:"none"}},"top-left-triangle":{triangle:{top:"-14px",left:"10px"},triangleShadow:{top:"-16px",left:"9px"}},"top-right-triangle":{triangle:{top:"-14px",right:"10px"},triangleShadow:{top:"-16px",right:"9px"}},"bottom-left-triangle":{triangle:{top:"35px",left:"10px",transform:"rotate(180deg)"},triangleShadow:{top:"37px",left:"9px",transform:"rotate(180deg)"}},"bottom-right-triangle":{triangle:{top:"35px",right:"10px",transform:"rotate(180deg)"},triangleShadow:{top:"37px",right:"9px",transform:"rotate(180deg)"}}},u),{"hide-triangle":a==="hide","top-left-triangle":a==="top-left","top-right-triangle":a==="top-right","bottom-left-triangle":a==="bottom-left","bottom-right-triangle":a==="bottom-right"}),v=function(b,y){return o({hex:b,source:"hex"},y)};return z.createElement("div",{style:_.card,className:"github-picker "+m},z.createElement("div",{style:_.triangleShadow}),z.createElement("div",{style:_.triangle}),Ps(r,function(C){return z.createElement(xZ,{color:C,key:C,onClick:v,onSwatchHover:i})}))};nv.propTypes={width:ut.oneOfType([ut.string,ut.number]),colors:ut.arrayOf(ut.string),triangle:ut.oneOf(["hide","top-left","top-right","bottom-left","bottom-right"]),styles:ut.object};nv.defaultProps={width:200,colors:["#B80000","#DB3E00","#FCCB00","#008B02","#006B76","#1273DE","#004DCF","#5300EB","#EB9694","#FAD0C3","#FEF3BD","#C1E1C5","#BEDADC","#C4DEF6","#BED3F3","#D4C4FB"],triangle:"top-left",styles:{}};Gr(nv);var EZ=function(t){var n=t.direction,r=jt({default:{picker:{width:"18px",height:"18px",borderRadius:"50%",transform:"translate(-9px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}},vertical:{picker:{transform:"translate(-3px, -9px)"}}},{vertical:n==="vertical"});return z.createElement("div",{style:r.picker})},CZ=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},rv=function(t){var n=t.width,r=t.height,o=t.onChange,i=t.hsl,a=t.direction,l=t.pointer,u=t.styles,p=u===void 0?{}:u,m=t.className,_=m===void 0?"":m,v=jt(Kr({default:{picker:{position:"relative",width:n,height:r},hue:{radius:"2px"}}},p)),C=function(y){return o({a:1,h:y.h,l:.5,s:1})};return z.createElement("div",{style:v.picker,className:"hue-picker "+_},z.createElement(pc,CZ({},v.hue,{hsl:i,pointer:l,onChange:C,direction:a})))};rv.propTypes={styles:ut.object};rv.defaultProps={width:"316px",height:"16px",direction:"horizontal",pointer:EZ,styles:{}};Gr(rv);var wZ=function(t){var n=t.onChange,r=t.hex,o=t.rgb,i=t.styles,a=i===void 0?{}:i,l=t.className,u=l===void 0?"":l,p=jt(Kr({default:{material:{width:"98px",height:"98px",padding:"16px",fontFamily:"Roboto"},HEXwrap:{position:"relative"},HEXinput:{width:"100%",marginTop:"12px",fontSize:"15px",color:"#333",padding:"0px",border:"0px",borderBottom:"2px solid "+r,outline:"none",height:"30px"},HEXlabel:{position:"absolute",top:"0px",left:"0px",fontSize:"11px",color:"#999999",textTransform:"capitalize"},Hex:{style:{}},RGBwrap:{position:"relative"},RGBinput:{width:"100%",marginTop:"12px",fontSize:"15px",color:"#333",padding:"0px",border:"0px",borderBottom:"1px solid #eee",outline:"none",height:"30px"},RGBlabel:{position:"absolute",top:"0px",left:"0px",fontSize:"11px",color:"#999999",textTransform:"capitalize"},split:{display:"flex",marginRight:"-10px",paddingTop:"11px"},third:{flex:"1",paddingRight:"10px"}}},a)),m=function(v,C){v.hex?Ka(v.hex)&&n({hex:v.hex,source:"hex"},C):(v.r||v.g||v.b)&&n({r:v.r||o.r,g:v.g||o.g,b:v.b||o.b,source:"rgb"},C)};return z.createElement(Ju,{styles:a},z.createElement("div",{style:p.material,className:"material-picker "+u},z.createElement(en,{style:{wrap:p.HEXwrap,input:p.HEXinput,label:p.HEXlabel},label:"hex",value:r,onChange:m}),z.createElement("div",{style:p.split,className:"flexbox-fix"},z.createElement("div",{style:p.third},z.createElement(en,{style:{wrap:p.RGBwrap,input:p.RGBinput,label:p.RGBlabel},label:"r",value:o.r,onChange:m})),z.createElement("div",{style:p.third},z.createElement(en,{style:{wrap:p.RGBwrap,input:p.RGBinput,label:p.RGBlabel},label:"g",value:o.g,onChange:m})),z.createElement("div",{style:p.third},z.createElement(en,{style:{wrap:p.RGBwrap,input:p.RGBinput,label:p.RGBlabel},label:"b",value:o.b,onChange:m})))))};Gr(wZ);var NZ=function(t){var n=t.onChange,r=t.rgb,o=t.hsv,i=t.hex,a=jt({default:{fields:{paddingTop:"5px",paddingBottom:"9px",width:"80px",position:"relative"},divider:{height:"5px"},RGBwrap:{position:"relative"},RGBinput:{marginLeft:"40%",width:"40%",height:"18px",border:"1px solid #888888",boxShadow:"inset 0 1px 1px rgba(0,0,0,.1), 0 1px 0 0 #ECECEC",marginBottom:"5px",fontSize:"13px",paddingLeft:"3px",marginRight:"10px"},RGBlabel:{left:"0px",top:"0px",width:"34px",textTransform:"uppercase",fontSize:"13px",height:"18px",lineHeight:"22px",position:"absolute"},HEXwrap:{position:"relative"},HEXinput:{marginLeft:"20%",width:"80%",height:"18px",border:"1px solid #888888",boxShadow:"inset 0 1px 1px rgba(0,0,0,.1), 0 1px 0 0 #ECECEC",marginBottom:"6px",fontSize:"13px",paddingLeft:"3px"},HEXlabel:{position:"absolute",top:"0px",left:"0px",width:"14px",textTransform:"uppercase",fontSize:"13px",height:"18px",lineHeight:"22px"},fieldSymbols:{position:"absolute",top:"5px",right:"-7px",fontSize:"13px"},symbol:{height:"20px",lineHeight:"22px",paddingBottom:"7px"}}}),l=function(p,m){p["#"]?Ka(p["#"])&&n({hex:p["#"],source:"hex"},m):p.r||p.g||p.b?n({r:p.r||r.r,g:p.g||r.g,b:p.b||r.b,source:"rgb"},m):(p.h||p.s||p.v)&&n({h:p.h||o.h,s:p.s||o.s,v:p.v||o.v,source:"hsv"},m)};return z.createElement("div",{style:a.fields},z.createElement(en,{style:{wrap:a.RGBwrap,input:a.RGBinput,label:a.RGBlabel},label:"h",value:Math.round(o.h),onChange:l}),z.createElement(en,{style:{wrap:a.RGBwrap,input:a.RGBinput,label:a.RGBlabel},label:"s",value:Math.round(o.s*100),onChange:l}),z.createElement(en,{style:{wrap:a.RGBwrap,input:a.RGBinput,label:a.RGBlabel},label:"v",value:Math.round(o.v*100),onChange:l}),z.createElement("div",{style:a.divider}),z.createElement(en,{style:{wrap:a.RGBwrap,input:a.RGBinput,label:a.RGBlabel},label:"r",value:r.r,onChange:l}),z.createElement(en,{style:{wrap:a.RGBwrap,input:a.RGBinput,label:a.RGBlabel},label:"g",value:r.g,onChange:l}),z.createElement(en,{style:{wrap:a.RGBwrap,input:a.RGBinput,label:a.RGBlabel},label:"b",value:r.b,onChange:l}),z.createElement("div",{style:a.divider}),z.createElement(en,{style:{wrap:a.HEXwrap,input:a.HEXinput,label:a.HEXlabel},label:"#",value:i.replace("#",""),onChange:l}),z.createElement("div",{style:a.fieldSymbols},z.createElement("div",{style:a.symbol},"°"),z.createElement("div",{style:a.symbol},"%"),z.createElement("div",{style:a.symbol},"%")))},TZ=function(t){var n=t.hsl,r=jt({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",boxShadow:"inset 0 0 0 1px #fff",transform:"translate(-6px, -6px)"}},"black-outline":{picker:{boxShadow:"inset 0 0 0 1px #000"}}},{"black-outline":n.l>.5});return z.createElement("div",{style:r.picker})},SZ=function(){var t=jt({default:{triangle:{width:0,height:0,borderStyle:"solid",borderWidth:"4px 0 4px 6px",borderColor:"transparent transparent transparent #fff",position:"absolute",top:"1px",left:"1px"},triangleBorder:{width:0,height:0,borderStyle:"solid",borderWidth:"5px 0 5px 8px",borderColor:"transparent transparent transparent #555"},left:{Extend:"triangleBorder",transform:"translate(-13px, -4px)"},leftInside:{Extend:"triangle",transform:"translate(-8px, -5px)"},right:{Extend:"triangleBorder",transform:"translate(20px, -14px) rotate(180deg)"},rightInside:{Extend:"triangle",transform:"translate(-8px, -5px)"}}});return z.createElement("div",{style:t.pointer},z.createElement("div",{style:t.left},z.createElement("div",{style:t.leftInside})),z.createElement("div",{style:t.right},z.createElement("div",{style:t.rightInside})))},Dx=function(t){var n=t.onClick,r=t.label,o=t.children,i=t.active,a=jt({default:{button:{backgroundImage:"linear-gradient(-180deg, #FFFFFF 0%, #E6E6E6 100%)",border:"1px solid #878787",borderRadius:"2px",height:"20px",boxShadow:"0 1px 0 0 #EAEAEA",fontSize:"14px",color:"#000",lineHeight:"20px",textAlign:"center",marginBottom:"10px",cursor:"pointer"}},active:{button:{boxShadow:"0 0 0 1px #878787"}}},{active:i});return z.createElement("div",{style:a.button,onClick:n},r||o)},OZ=function(t){var n=t.rgb,r=t.currentColor,o=jt({default:{swatches:{border:"1px solid #B3B3B3",borderBottom:"1px solid #F0F0F0",marginBottom:"2px",marginTop:"1px"},new:{height:"34px",background:"rgb("+n.r+","+n.g+", "+n.b+")",boxShadow:"inset 1px 0 0 #000, inset -1px 0 0 #000, inset 0 1px 0 #000"},current:{height:"34px",background:r,boxShadow:"inset 1px 0 0 #000, inset -1px 0 0 #000, inset 0 -1px 0 #000"},label:{fontSize:"14px",color:"#000",textAlign:"center"}}});return z.createElement("div",null,z.createElement("div",{style:o.label},"new"),z.createElement("div",{style:o.swatches},z.createElement("div",{style:o.new}),z.createElement("div",{style:o.current})),z.createElement("div",{style:o.label},"current"))},AZ=function(){function e(t,n){for(var r=0;r<n.length;r++){var o=n[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function RZ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function $Z(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function DZ(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var ov=function(e){DZ(t,e);function t(n){RZ(this,t);var r=$Z(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return r.state={currentColor:n.hex},r}return AZ(t,[{key:"render",value:function(){var r=this.props,o=r.styles,i=o===void 0?{}:o,a=r.className,l=a===void 0?"":a,u=jt(Kr({default:{picker:{background:"#DCDCDC",borderRadius:"4px",boxShadow:"0 0 0 1px rgba(0,0,0,.25), 0 8px 16px rgba(0,0,0,.15)",boxSizing:"initial",width:"513px"},head:{backgroundImage:"linear-gradient(-180deg, #F0F0F0 0%, #D4D4D4 100%)",borderBottom:"1px solid #B1B1B1",boxShadow:"inset 0 1px 0 0 rgba(255,255,255,.2), inset 0 -1px 0 0 rgba(0,0,0,.02)",height:"23px",lineHeight:"24px",borderRadius:"4px 4px 0 0",fontSize:"13px",color:"#4D4D4D",textAlign:"center"},body:{padding:"15px 15px 0",display:"flex"},saturation:{width:"256px",height:"256px",position:"relative",border:"2px solid #B3B3B3",borderBottom:"2px solid #F0F0F0",overflow:"hidden"},hue:{position:"relative",height:"256px",width:"19px",marginLeft:"10px",border:"2px solid #B3B3B3",borderBottom:"2px solid #F0F0F0"},controls:{width:"180px",marginLeft:"10px"},top:{display:"flex"},previews:{width:"60px"},actions:{flex:"1",marginLeft:"20px"}}},i));return z.createElement("div",{style:u.picker,className:"photoshop-picker "+l},z.createElement("div",{style:u.head},this.props.header),z.createElement("div",{style:u.body,className:"flexbox-fix"},z.createElement("div",{style:u.saturation},z.createElement(rh,{hsl:this.props.hsl,hsv:this.props.hsv,pointer:TZ,onChange:this.props.onChange})),z.createElement("div",{style:u.hue},z.createElement(pc,{direction:"vertical",hsl:this.props.hsl,pointer:SZ,onChange:this.props.onChange})),z.createElement("div",{style:u.controls},z.createElement("div",{style:u.top,className:"flexbox-fix"},z.createElement("div",{style:u.previews},z.createElement(OZ,{rgb:this.props.rgb,currentColor:this.state.currentColor})),z.createElement("div",{style:u.actions},z.createElement(Dx,{label:"OK",onClick:this.props.onAccept,active:!0}),z.createElement(Dx,{label:"Cancel",onClick:this.props.onCancel}),z.createElement(NZ,{onChange:this.props.onChange,rgb:this.props.rgb,hsv:this.props.hsv,hex:this.props.hex}))))))}}]),t}(z.Component);ov.propTypes={header:ut.string,styles:ut.object};ov.defaultProps={header:"Color Picker",styles:{}};Gr(ov);var MZ=function(t){var n=t.onChange,r=t.rgb,o=t.hsl,i=t.hex,a=t.disableAlpha,l=jt({default:{fields:{display:"flex",paddingTop:"4px"},single:{flex:"1",paddingLeft:"6px"},alpha:{flex:"1",paddingLeft:"6px"},double:{flex:"2"},input:{width:"80%",padding:"4px 10% 3px",border:"none",boxShadow:"inset 0 0 0 1px #ccc",fontSize:"11px"},label:{display:"block",textAlign:"center",fontSize:"11px",color:"#222",paddingTop:"3px",paddingBottom:"4px",textTransform:"capitalize"}},disableAlpha:{alpha:{display:"none"}}},{disableAlpha:a}),u=function(m,_){m.hex?Ka(m.hex)&&n({hex:m.hex,source:"hex"},_):m.r||m.g||m.b?n({r:m.r||r.r,g:m.g||r.g,b:m.b||r.b,a:r.a,source:"rgb"},_):m.a&&(m.a<0?m.a=0:m.a>100&&(m.a=100),m.a/=100,n({h:o.h,s:o.s,l:o.l,a:m.a,source:"rgb"},_))};return z.createElement("div",{style:l.fields,className:"flexbox-fix"},z.createElement("div",{style:l.double},z.createElement(en,{style:{input:l.input,label:l.label},label:"hex",value:i.replace("#",""),onChange:u})),z.createElement("div",{style:l.single},z.createElement(en,{style:{input:l.input,label:l.label},label:"r",value:r.r,onChange:u,dragLabel:"true",dragMax:"255"})),z.createElement("div",{style:l.single},z.createElement(en,{style:{input:l.input,label:l.label},label:"g",value:r.g,onChange:u,dragLabel:"true",dragMax:"255"})),z.createElement("div",{style:l.single},z.createElement(en,{style:{input:l.input,label:l.label},label:"b",value:r.b,onChange:u,dragLabel:"true",dragMax:"255"})),z.createElement("div",{style:l.alpha},z.createElement(en,{style:{input:l.input,label:l.label},label:"a",value:Math.round(r.a*100),onChange:u,dragLabel:"true",dragMax:"100"})))},kZ=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},FS=function(t){var n=t.colors,r=t.onClick,o=r===void 0?function(){}:r,i=t.onSwatchHover,a=jt({default:{colors:{margin:"0 -10px",padding:"10px 0 0 10px",borderTop:"1px solid #eee",display:"flex",flexWrap:"wrap",position:"relative"},swatchWrap:{width:"16px",height:"16px",margin:"0 10px 10px 0"},swatch:{borderRadius:"3px",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15)"}},"no-presets":{colors:{display:"none"}}},{"no-presets":!n||!n.length}),l=function(p,m){o({hex:p,source:"hex"},m)};return z.createElement("div",{style:a.colors,className:"flexbox-fix"},n.map(function(u){var p=typeof u=="string"?{color:u}:u,m=""+p.color+(p.title||"");return z.createElement("div",{key:m,style:a.swatchWrap},z.createElement(ks,kZ({},p,{style:a.swatch,onClick:l,onHover:i,focusStyle:{boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15), 0 0 4px "+p.color}})))}))};FS.propTypes={colors:ut.arrayOf(ut.oneOfType([ut.string,ut.shape({color:ut.string,title:ut.string})])).isRequired};var PZ=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},iv=function(t){var n=t.width,r=t.rgb,o=t.hex,i=t.hsv,a=t.hsl,l=t.onChange,u=t.onSwatchHover,p=t.disableAlpha,m=t.presetColors,_=t.renderers,v=t.styles,C=v===void 0?{}:v,b=t.className,y=b===void 0?"":b,N=jt(Kr({default:PZ({picker:{width:n,padding:"10px 10px 0",boxSizing:"initial",background:"#fff",borderRadius:"4px",boxShadow:"0 0 0 1px rgba(0,0,0,.15), 0 8px 16px rgba(0,0,0,.15)"},saturation:{width:"100%",paddingBottom:"75%",position:"relative",overflow:"hidden"},Saturation:{radius:"3px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},controls:{display:"flex"},sliders:{padding:"4px 0",flex:"1"},color:{width:"24px",height:"24px",position:"relative",marginTop:"4px",marginLeft:"4px",borderRadius:"3px"},activeColor:{absolute:"0px 0px 0px 0px",borderRadius:"2px",background:"rgba("+r.r+","+r.g+","+r.b+","+r.a+")",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},hue:{position:"relative",height:"10px",overflow:"hidden"},Hue:{radius:"2px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},alpha:{position:"relative",height:"10px",marginTop:"4px",overflow:"hidden"},Alpha:{radius:"2px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"}},C),disableAlpha:{color:{height:"10px"},hue:{height:"10px"},alpha:{display:"none"}}},C),{disableAlpha:p});return z.createElement("div",{style:N.picker,className:"sketch-picker "+y},z.createElement("div",{style:N.saturation},z.createElement(rh,{style:N.Saturation,hsl:a,hsv:i,onChange:l})),z.createElement("div",{style:N.controls,className:"flexbox-fix"},z.createElement("div",{style:N.sliders},z.createElement("div",{style:N.hue},z.createElement(pc,{style:N.Hue,hsl:a,onChange:l})),z.createElement("div",{style:N.alpha},z.createElement(jm,{style:N.Alpha,rgb:r,hsl:a,renderers:_,onChange:l}))),z.createElement("div",{style:N.color},z.createElement(hc,null),z.createElement("div",{style:N.activeColor}))),z.createElement(MZ,{rgb:r,hsl:a,hex:o,onChange:l,disableAlpha:p}),z.createElement(FS,{colors:m,onClick:l,onSwatchHover:u}))};iv.propTypes={disableAlpha:ut.bool,width:ut.oneOfType([ut.string,ut.number]),styles:ut.object};iv.defaultProps={disableAlpha:!1,width:200,styles:{},presetColors:["#D0021B","#F5A623","#F8E71C","#8B572A","#7ED321","#417505","#BD10E0","#9013FE","#4A90E2","#50E3C2","#B8E986","#000000","#4A4A4A","#9B9B9B","#FFFFFF"]};const IZ=Gr(iv);var pu=function(t){var n=t.hsl,r=t.offset,o=t.onClick,i=o===void 0?function(){}:o,a=t.active,l=t.first,u=t.last,p=jt({default:{swatch:{height:"12px",background:"hsl("+n.h+", 50%, "+r*100+"%)",cursor:"pointer"}},first:{swatch:{borderRadius:"2px 0 0 2px"}},last:{swatch:{borderRadius:"0 2px 2px 0"}},active:{swatch:{transform:"scaleY(1.8)",borderRadius:"3.6px/2px"}}},{active:a,first:l,last:u}),m=function(v){return i({h:n.h,s:.5,l:r,source:"hsl"},v)};return z.createElement("div",{style:p.swatch,onClick:m})},LZ=function(t){var n=t.onClick,r=t.hsl,o=jt({default:{swatches:{marginTop:"20px"},swatch:{boxSizing:"border-box",width:"20%",paddingRight:"1px",float:"left"},clear:{clear:"both"}}}),i=.1;return z.createElement("div",{style:o.swatches},z.createElement("div",{style:o.swatch},z.createElement(pu,{hsl:r,offset:".80",active:Math.abs(r.l-.8)<i&&Math.abs(r.s-.5)<i,onClick:n,first:!0})),z.createElement("div",{style:o.swatch},z.createElement(pu,{hsl:r,offset:".65",active:Math.abs(r.l-.65)<i&&Math.abs(r.s-.5)<i,onClick:n})),z.createElement("div",{style:o.swatch},z.createElement(pu,{hsl:r,offset:".50",active:Math.abs(r.l-.5)<i&&Math.abs(r.s-.5)<i,onClick:n})),z.createElement("div",{style:o.swatch},z.createElement(pu,{hsl:r,offset:".35",active:Math.abs(r.l-.35)<i&&Math.abs(r.s-.5)<i,onClick:n})),z.createElement("div",{style:o.swatch},z.createElement(pu,{hsl:r,offset:".20",active:Math.abs(r.l-.2)<i&&Math.abs(r.s-.5)<i,onClick:n,last:!0})),z.createElement("div",{style:o.clear}))},FZ=function(){var t=jt({default:{picker:{width:"14px",height:"14px",borderRadius:"6px",transform:"translate(-7px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}}});return z.createElement("div",{style:t.picker})},av=function(t){var n=t.hsl,r=t.onChange,o=t.pointer,i=t.styles,a=i===void 0?{}:i,l=t.className,u=l===void 0?"":l,p=jt(Kr({default:{hue:{height:"12px",position:"relative"},Hue:{radius:"2px"}}},a));return z.createElement("div",{style:p.wrap||{},className:"slider-picker "+u},z.createElement("div",{style:p.hue},z.createElement(pc,{style:p.Hue,hsl:n,pointer:o,onChange:r})),z.createElement("div",{style:p.swatches},z.createElement(LZ,{hsl:n,onClick:r})))};av.propTypes={styles:ut.object};av.defaultProps={pointer:FZ,styles:{}};Gr(av);var jS={};Object.defineProperty(jS,"__esModule",{value:!0});var Mx=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},jZ=z,kx=BZ(jZ);function BZ(e){return e&&e.__esModule?e:{default:e}}function HZ(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}var Zd=24,WZ=jS.default=function(e){var t=e.fill,n=t===void 0?"currentColor":t,r=e.width,o=r===void 0?Zd:r,i=e.height,a=i===void 0?Zd:i,l=e.style,u=l===void 0?{}:l,p=HZ(e,["fill","width","height","style"]);return kx.default.createElement("svg",Mx({viewBox:"0 0 "+Zd+" "+Zd,style:Mx({fill:n,width:o,height:a},u)},p),kx.default.createElement("path",{d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"}))},zZ=function(t){var n=t.color,r=t.onClick,o=r===void 0?function(){}:r,i=t.onSwatchHover,a=t.first,l=t.last,u=t.active,p=jt({default:{color:{width:"40px",height:"24px",cursor:"pointer",background:n,marginBottom:"1px"},check:{color:Ym(n),marginLeft:"8px",display:"none"}},first:{color:{overflow:"hidden",borderRadius:"2px 2px 0 0"}},last:{color:{overflow:"hidden",borderRadius:"0 0 2px 2px"}},active:{check:{display:"block"}},"color-#FFFFFF":{color:{boxShadow:"inset 0 0 0 1px #ddd"},check:{color:"#333"}},transparent:{check:{color:"#333"}}},{first:a,last:l,active:u,"color-#FFFFFF":n==="#FFFFFF",transparent:n==="transparent"});return z.createElement(ks,{color:n,style:p.color,onClick:o,onHover:i,focusStyle:{boxShadow:"0 0 4px "+n}},z.createElement("div",{style:p.check},z.createElement(WZ,null)))},KZ=function(t){var n=t.onClick,r=t.onSwatchHover,o=t.group,i=t.active,a=jt({default:{group:{paddingBottom:"10px",width:"40px",float:"left",marginRight:"10px"}}});return z.createElement("div",{style:a.group},Ps(o,function(l,u){return z.createElement(zZ,{key:l,color:l,active:l.toLowerCase()===i,first:u===0,last:u===o.length-1,onClick:n,onSwatchHover:r})}))},sv=function(t){var n=t.width,r=t.height,o=t.onChange,i=t.onSwatchHover,a=t.colors,l=t.hex,u=t.styles,p=u===void 0?{}:u,m=t.className,_=m===void 0?"":m,v=jt(Kr({default:{picker:{width:n,height:r},overflow:{height:r,overflowY:"scroll"},body:{padding:"16px 0 6px 16px"},clear:{clear:"both"}}},p)),C=function(y,N){return o({hex:y,source:"hex"},N)};return z.createElement("div",{style:v.picker,className:"swatches-picker "+_},z.createElement(Ju,null,z.createElement("div",{style:v.overflow},z.createElement("div",{style:v.body},Ps(a,function(b){return z.createElement(KZ,{key:b.toString(),group:b,active:l,onClick:C,onSwatchHover:i})}),z.createElement("div",{style:v.clear})))))};sv.propTypes={width:ut.oneOfType([ut.string,ut.number]),height:ut.oneOfType([ut.string,ut.number]),colors:ut.arrayOf(ut.arrayOf(ut.string)),styles:ut.object};sv.defaultProps={width:320,height:240,colors:[[xl[900],xl[700],xl[500],xl[300],xl[100]],[El[900],El[700],El[500],El[300],El[100]],[Cl[900],Cl[700],Cl[500],Cl[300],Cl[100]],[wl[900],wl[700],wl[500],wl[300],wl[100]],[Nl[900],Nl[700],Nl[500],Nl[300],Nl[100]],[Tl[900],Tl[700],Tl[500],Tl[300],Tl[100]],[Sl[900],Sl[700],Sl[500],Sl[300],Sl[100]],[Ol[900],Ol[700],Ol[500],Ol[300],Ol[100]],[Al[900],Al[700],Al[500],Al[300],Al[100]],["#194D33",yu[700],yu[500],yu[300],yu[100]],[Rl[900],Rl[700],Rl[500],Rl[300],Rl[100]],[$l[900],$l[700],$l[500],$l[300],$l[100]],[Dl[900],Dl[700],Dl[500],Dl[300],Dl[100]],[Ml[900],Ml[700],Ml[500],Ml[300],Ml[100]],[kl[900],kl[700],kl[500],kl[300],kl[100]],[Pl[900],Pl[700],Pl[500],Pl[300],Pl[100]],[Il[900],Il[700],Il[500],Il[300],Il[100]],[Ll[900],Ll[700],Ll[500],Ll[300],Ll[100]],["#000000","#525252","#969696","#D9D9D9","#FFFFFF"]],styles:{}};Gr(sv);var lv=function(t){var n=t.onChange,r=t.onSwatchHover,o=t.hex,i=t.colors,a=t.width,l=t.triangle,u=t.styles,p=u===void 0?{}:u,m=t.className,_=m===void 0?"":m,v=jt(Kr({default:{card:{width:a,background:"#fff",border:"0 solid rgba(0,0,0,0.25)",boxShadow:"0 1px 4px rgba(0,0,0,0.25)",borderRadius:"4px",position:"relative"},body:{padding:"15px 9px 9px 15px"},label:{fontSize:"18px",color:"#fff"},triangle:{width:"0px",height:"0px",borderStyle:"solid",borderWidth:"0 9px 10px 9px",borderColor:"transparent transparent #fff transparent",position:"absolute"},triangleShadow:{width:"0px",height:"0px",borderStyle:"solid",borderWidth:"0 9px 10px 9px",borderColor:"transparent transparent rgba(0,0,0,.1) transparent",position:"absolute"},hash:{background:"#F0F0F0",height:"30px",width:"30px",borderRadius:"4px 0 0 4px",float:"left",color:"#98A1A4",display:"flex",alignItems:"center",justifyContent:"center"},input:{width:"100px",fontSize:"14px",color:"#666",border:"0px",outline:"none",height:"28px",boxShadow:"inset 0 0 0 1px #F0F0F0",boxSizing:"content-box",borderRadius:"0 4px 4px 0",float:"left",paddingLeft:"8px"},swatch:{width:"30px",height:"30px",float:"left",borderRadius:"4px",margin:"0 6px 6px 0"},clear:{clear:"both"}},"hide-triangle":{triangle:{display:"none"},triangleShadow:{display:"none"}},"top-left-triangle":{triangle:{top:"-10px",left:"12px"},triangleShadow:{top:"-11px",left:"12px"}},"top-right-triangle":{triangle:{top:"-10px",right:"12px"},triangleShadow:{top:"-11px",right:"12px"}}},p),{"hide-triangle":l==="hide","top-left-triangle":l==="top-left","top-right-triangle":l==="top-right"}),C=function(y,N){Ka(y)&&n({hex:y,source:"hex"},N)};return z.createElement("div",{style:v.card,className:"twitter-picker "+_},z.createElement("div",{style:v.triangleShadow}),z.createElement("div",{style:v.triangle}),z.createElement("div",{style:v.body},Ps(i,function(b,y){return z.createElement(ks,{key:y,color:b,hex:b,style:v.swatch,onClick:C,onHover:r,focusStyle:{boxShadow:"0 0 4px "+b}})}),z.createElement("div",{style:v.hash},"#"),z.createElement(en,{label:null,style:{input:v.input},value:o.replace("#",""),onChange:C}),z.createElement("div",{style:v.clear})))};lv.propTypes={width:ut.oneOfType([ut.string,ut.number]),triangle:ut.oneOf(["hide","top-left","top-right"]),colors:ut.arrayOf(ut.string),styles:ut.object};lv.defaultProps={width:276,colors:["#FF6900","#FCB900","#7BDCB5","#00D084","#8ED1FC","#0693E3","#ABB8C3","#EB144C","#F78DA7","#9900EF"],triangle:"top-left",styles:{}};Gr(lv);var cv=function(t){var n=jt({default:{picker:{width:"20px",height:"20px",borderRadius:"22px",border:"2px #fff solid",transform:"translate(-12px, -13px)",background:"hsl("+Math.round(t.hsl.h)+", "+Math.round(t.hsl.s*100)+"%, "+Math.round(t.hsl.l*100)+"%)"}}});return z.createElement("div",{style:n.picker})};cv.propTypes={hsl:ut.shape({h:ut.number,s:ut.number,l:ut.number,a:ut.number})};cv.defaultProps={hsl:{a:1,h:249.94,l:.2,s:.5}};var uv=function(t){var n=jt({default:{picker:{width:"20px",height:"20px",borderRadius:"22px",transform:"translate(-10px, -7px)",background:"hsl("+Math.round(t.hsl.h)+", 100%, 50%)",border:"2px white solid"}}});return z.createElement("div",{style:n.picker})};uv.propTypes={hsl:ut.shape({h:ut.number,s:ut.number,l:ut.number,a:ut.number})};uv.defaultProps={hsl:{a:1,h:249.94,l:.2,s:.5}};var GZ=function(t){var n=t.onChange,r=t.rgb,o=t.hsl,i=t.hex,a=t.hsv,l=function(C,b){if(C.hex)Ka(C.hex)&&n({hex:C.hex,source:"hex"},b);else if(C.rgb){var y=C.rgb.split(",");Ap(C.rgb,"rgb")&&n({r:y[0],g:y[1],b:y[2],a:1,source:"rgb"},b)}else if(C.hsv){var N=C.hsv.split(",");Ap(C.hsv,"hsv")&&(N[2]=N[2].replace("%",""),N[1]=N[1].replace("%",""),N[0]=N[0].replace("°",""),N[1]==1?N[1]=.01:N[2]==1&&(N[2]=.01),n({h:Number(N[0]),s:Number(N[1]),v:Number(N[2]),source:"hsv"},b))}else if(C.hsl){var R=C.hsl.split(",");Ap(C.hsl,"hsl")&&(R[2]=R[2].replace("%",""),R[1]=R[1].replace("%",""),R[0]=R[0].replace("°",""),_[1]==1?_[1]=.01:_[2]==1&&(_[2]=.01),n({h:Number(R[0]),s:Number(R[1]),v:Number(R[2]),source:"hsl"},b))}},u=jt({default:{wrap:{display:"flex",height:"100px",marginTop:"4px"},fields:{width:"100%"},column:{paddingTop:"10px",display:"flex",justifyContent:"space-between"},double:{padding:"0px 4.4px",boxSizing:"border-box"},input:{width:"100%",height:"38px",boxSizing:"border-box",padding:"4px 10% 3px",textAlign:"center",border:"1px solid #dadce0",fontSize:"11px",textTransform:"lowercase",borderRadius:"5px",outline:"none",fontFamily:"Roboto,Arial,sans-serif"},input2:{height:"38px",width:"100%",border:"1px solid #dadce0",boxSizing:"border-box",fontSize:"11px",textTransform:"lowercase",borderRadius:"5px",outline:"none",paddingLeft:"10px",fontFamily:"Roboto,Arial,sans-serif"},label:{textAlign:"center",fontSize:"12px",background:"#fff",position:"absolute",textTransform:"uppercase",color:"#3c4043",width:"35px",top:"-6px",left:"0",right:"0",marginLeft:"auto",marginRight:"auto",fontFamily:"Roboto,Arial,sans-serif"},label2:{left:"10px",textAlign:"center",fontSize:"12px",background:"#fff",position:"absolute",textTransform:"uppercase",color:"#3c4043",width:"32px",top:"-6px",fontFamily:"Roboto,Arial,sans-serif"},single:{flexGrow:"1",margin:"0px 4.4px"}}}),p=r.r+", "+r.g+", "+r.b,m=Math.round(o.h)+"°, "+Math.round(o.s*100)+"%, "+Math.round(o.l*100)+"%",_=Math.round(a.h)+"°, "+Math.round(a.s*100)+"%, "+Math.round(a.v*100)+"%";return z.createElement("div",{style:u.wrap,className:"flexbox-fix"},z.createElement("div",{style:u.fields},z.createElement("div",{style:u.double},z.createElement(en,{style:{input:u.input,label:u.label},label:"hex",value:i,onChange:l})),z.createElement("div",{style:u.column},z.createElement("div",{style:u.single},z.createElement(en,{style:{input:u.input2,label:u.label2},label:"rgb",value:p,onChange:l})),z.createElement("div",{style:u.single},z.createElement(en,{style:{input:u.input2,label:u.label2},label:"hsv",value:_,onChange:l})),z.createElement("div",{style:u.single},z.createElement(en,{style:{input:u.input2,label:u.label2},label:"hsl",value:m,onChange:l})))))},dv=function(t){var n=t.width,r=t.onChange,o=t.rgb,i=t.hsl,a=t.hsv,l=t.hex,u=t.header,p=t.styles,m=p===void 0?{}:p,_=t.className,v=_===void 0?"":_,C=jt(Kr({default:{picker:{width:n,background:"#fff",border:"1px solid #dfe1e5",boxSizing:"initial",display:"flex",flexWrap:"wrap",borderRadius:"8px 8px 0px 0px"},head:{height:"57px",width:"100%",paddingTop:"16px",paddingBottom:"16px",paddingLeft:"16px",fontSize:"20px",boxSizing:"border-box",fontFamily:"Roboto-Regular,HelveticaNeue,Arial,sans-serif"},saturation:{width:"70%",padding:"0px",position:"relative",overflow:"hidden"},swatch:{width:"30%",height:"228px",padding:"0px",background:"rgba("+o.r+", "+o.g+", "+o.b+", 1)",position:"relative",overflow:"hidden"},body:{margin:"auto",width:"95%"},controls:{display:"flex",boxSizing:"border-box",height:"52px",paddingTop:"22px"},color:{width:"32px"},hue:{height:"8px",position:"relative",margin:"0px 16px 0px 16px",width:"100%"},Hue:{radius:"2px"}}},m));return z.createElement("div",{style:C.picker,className:"google-picker "+v},z.createElement("div",{style:C.head},u),z.createElement("div",{style:C.swatch}),z.createElement("div",{style:C.saturation},z.createElement(rh,{hsl:i,hsv:a,pointer:cv,onChange:r})),z.createElement("div",{style:C.body},z.createElement("div",{style:C.controls,className:"flexbox-fix"},z.createElement("div",{style:C.hue},z.createElement(pc,{style:C.Hue,hsl:i,radius:"4px",pointer:uv,onChange:r}))),z.createElement(GZ,{rgb:o,hsl:i,hex:l,hsv:a,onChange:r})))};dv.propTypes={width:ut.oneOfType([ut.string,ut.number]),styles:ut.object,header:ut.string};dv.defaultProps={width:652,styles:{},header:"Color picker"};Gr(dv);const UZ=({field:e,value:t,onChange:n})=>{const[r,o]=z.useState(!1),i=VZ(t);return ne.jsx(ne.Fragment,{children:ne.jsxs(Zt.FieldLabel,{label:e.label||"Label is undefined",className:"ve-mt-2.5",children:[ne.jsx("div",{style:i.swatch,onClick:()=>o(a=>!a),children:ne.jsx("div",{style:i.color})}),r&&ne.jsxs("div",{style:i.popover,children:[ne.jsx("div",{style:i.cover,onClick:()=>o(!1)}),ne.jsx(IZ,{disableAlpha:!0,color:t,onChange:a=>{n(a.hex)}})]})]})})},VZ=e=>({color:{width:"36px",height:"14px",borderRadius:"2px",background:e},swatch:{padding:"5px",background:"#fff",borderRadius:"1px",boxShadow:"0 0 0 1px rgba(0,0,0,.1)",display:"inline-block",cursor:"pointer"},popover:{position:"absolute",zIndex:"2"},cover:{position:"fixed",top:"0px",right:"0px",bottom:"0px",left:"0px"}}),YZ=e=>{const t={label:e.label,type:"object",objectFields:{}};return Object.entries(e.styles).forEach(([n,r])=>{if("type"in r){const o=Px(r);o&&(t.objectFields[n]=o)}else{const o={label:r.label,type:"object",objectFields:{}};for(const i in r.styles)o.objectFields[i]=Px(r.styles[i]);t.objectFields[n]=o}}),t},Px=e=>{switch(e.type){case"number":return{label:e.label,type:"number"};case"select":return{label:e.label,type:"select",options:e.options};case"color":return{label:e.label,type:"custom",render:UZ}}},qZ=(e,t,n="")=>{const r={};return Object.entries(t.styles).forEach(([o,i])=>{if("type"in i){const a=e==null?void 0:e[`--${i.plugin}-${n}-${o}`];r[o]=Ix(i,a)}else{const a={};for(const l in i.styles){const u=i.styles[l],p=e==null?void 0:e[`--${i.plugin}-${n}-${o}-${l}`];a[l]=Ix(u,p)}r[o]=a}}),r},Ix=(e,t)=>{if(t)if(e.type==="number"){const n=Number.parseInt(t);return isNaN(n)?e.default:n}else return t;else return e.default},ZZ=e=>{var i,a;const{themeConfig:t,themeHistoriesRef:n,onThemeChange:r}=e;if(!n.current)return;if(!t)return ne.jsx("div",{children:ne.jsx(cg,{children:ne.jsx(ug,{children:"Please contact your developer to set up theme management."})})});const o=(a=n.current)==null?void 0:a.histories[(i=n.current)==null?void 0:i.index].data;return ne.jsxs("div",{children:[ne.jsx(cg,{children:ne.jsx(ug,{children:"Changes to the theme will affect all templates and layouts for the entire site."})}),Object.entries(t).map(([l,u])=>{const p=YZ(u),m=qZ(o,u,l);return ne.jsx(Zt.FieldLabel,{label:p.label??"",className:"theme-field",el:"div",children:ne.jsx(Zt.AutoField,{field:p,onChange:_=>r(l,u,_),value:m})},l)})]})},JZ=e=>{var p,m;const{isDevMode:t,setThemeHistories:n,onPublishTheme:r,themeConfig:o,themeHistories:i,clearThemeHistory:a,puckInitialHistory:l}=e,{history:{setHistories:u}}=Zt.usePuck();return z.useEffect(()=>{u((l==null?void 0:l.histories)||[])},[l]),z.useEffect(()=>{const _=document.querySelector("[class*='PuckLayout-leftSideBar'] > div[class*='SidebarSection--noBorderTop']");_&&(_.style.display="none");const v=document.querySelector("[class*='PuckLayout-rightSideBar'] > div[class*='SidebarSection--noBorderTop'] > div[class*='SidebarSection-title']");v&&(v.style.display="none")},[]),ne.jsxs("header",{className:"puck-header",children:[ne.jsxs("div",{className:"header-left",children:[ne.jsx(fN,{}),ne.jsx(bN,{})]}),ne.jsx("div",{className:"header-center"}),ne.jsxs("div",{className:"actions",children:[ne.jsx(xT,{disabled:((p=i==null?void 0:i.histories)==null?void 0:p.length)===1,onClearLocalChanges:()=>{var _,v,C,b,y,N;a(),o&&zf((v=(_=i==null?void 0:i.histories)==null?void 0:_[0])==null?void 0:v.data,o),n({histories:[{id:((b=(C=i==null?void 0:i.histories)==null?void 0:C[0])==null?void 0:b.id)??"",data:((N=(y=i==null?void 0:i.histories)==null?void 0:y[0])==null?void 0:N.data)??{}}],index:0})}}),!t&&ne.jsx(Vi,{variant:"secondary",disabled:((m=i==null?void 0:i.histories)==null?void 0:m.length)===1,onClick:async()=>{await r()},children:"Publish"})]})]})},$p=new zr,XZ=({puckConfig:e,puckInitialHistory:t,isLoading:n,templateMetadata:r,publishThemeConfiguration:o,themeConfig:i,saveThemeSaveState:a,themeHistories:l,setThemeHistories:u,clearThemeHistory:p,sendDevThemeSaveStateData:m,buildThemeLocalStorageKey:_})=>{const[v,C]=z.useState(!1),b=z.useRef(l);z.useEffect(()=>{b.current=l},[l]);const y=async()=>{if($p.logFunc("saveThemeData"),!l)return;const k=l.histories[l.index];o({payload:{saveThemeData:JSON.stringify(k.data)}}),p(),u({histories:[k],index:0})},N=(k,I,M)=>{var re,Z,U,J;if(!b.current||!i)return;const Y={...(re=b.current.histories[b.current.index])==null?void 0:re.data,...m2(M,k,I)},ee={histories:[...b.current.histories,{id:x1.v4(),data:Y}],index:b.current.histories.length};window.localStorage.setItem(_(),JSON.stringify(ee.histories)),r.isDevMode&&!r.devOverride?($p.logFunc("sendDevThemeSaveStateData"),m({payload:{devThemeSaveStateData:JSON.stringify((Z=ee.histories[ee.index])==null?void 0:Z.data)}})):($p.logFunc("saveTheme"),a({payload:{history:JSON.stringify((U=ee.histories[ee.index])==null?void 0:U.data),hash:(J=ee.histories[ee.index])==null?void 0:J.id}})),zf(Y,i),u(ee)},R=async()=>{if(!n&&!v){C(!0);return}},O=z.useCallback(()=>ne.jsx(ZZ,{themeHistoriesRef:b,themeConfig:i,onThemeChange:N}),[]);return ne.jsx(bw,{children:ne.jsx(Zt.Puck,{config:e,data:{},initialHistory:t,onChange:R,permissions:{drag:!1,duplicate:!1,delete:!1,insert:!1,edit:!1},overrides:{header:()=>ne.jsx(JZ,{themeConfig:i,themeHistories:l,onPublishTheme:y,isDevMode:r.isDevMode,setThemeHistories:u,clearThemeHistory:p,puckInitialHistory:t}),actionBar:()=>ne.jsx(ne.Fragment,{}),components:()=>ne.jsx(ne.Fragment,{}),fields:O}})})},QZ=()=>{const{sendToParent:e}=Bo("saveThemeSaveState",cr),{sendToParent:t}=Bo("deleteThemeSaveState",cr),{sendToParent:n}=Bo("saveThemeData",cr),{sendToParent:r}=Bo("sendDevThemeSaveStateData",cr);return{saveThemeSaveState:e,deleteThemeSaveState:t,publishThemeConfiguration:n,sendDevThemeSaveStateData:r}},eJ=new zr,tJ=()=>{const{iFrameLoaded:e}=Wu();z.useEffect(()=>{e({payload:{message:"Theme Editor is loaded"}})},[]);const[t,n]=z.useState(void 0),[r,o]=z.useState(!1);return ka("getThemeSaveState",cr,(i,a)=>{eJ.logData("THEME_SAVE_STATE",a),n(a),o(!0),i({status:"success",payload:{message:"themeSaveState received"}})}),{themeSaveState:t,themeSaveStateFetched:r}},eo=new zr,nJ=e=>{const{puckConfig:t,templateMetadata:n,visualConfigurationData:r,themeData:o,themeConfig:i}=e,{sendDevThemeSaveStateData:a,saveThemeSaveState:l,publishThemeConfiguration:u,deleteThemeSaveState:p}=QZ(),{themeSaveState:m,themeSaveStateFetched:_}=tJ(),{buildThemeLocalStorageKey:v,clearThemeLocalStorage:C}=E2(n),[b,y]=z.useState(),[N,R]=z.useState(!1),[O,k]=z.useState(),[I,M]=z.useState(!1),Y=z.useCallback(()=>{n&&(eo.logFunc("loadPuckInitialHistory"),r&&y({histories:[{id:"root",state:{data:r}}],appendData:!1}),R(!0))},[y,R,r]),ee=z.useCallback(()=>{if(!n)return;if(eo.logFunc("loadThemeHistory"),eo.logData("THEME_DATA",o),eo.logData("THEME_SAVE_STATE",m),n.isDevMode&&!n.devOverride){const ge=window.localStorage.getItem(v());if(ge){eo.log("Theme Dev Mode - Using theme localStorage");const te=JSON.parse(ge),he=te.length-1;k({histories:te,index:he}),M(!0);return}eo.log("Theme Dev Mode - No localStorage. Using theme data from Content"),o&&k({histories:[{id:"root",data:o}],index:0}),M(!0);return}if(!m){C(),eo.log("Theme Prod Mode - No saveState. Using theme data from Content"),o&&k({histories:[{id:"root",data:o}],index:0}),M(!0);return}const J=window.localStorage.getItem(v());if(!J){eo.log("Theme Prod Mode - No localStorage. Using themeSaveState"),k({histories:o?[{id:"root",data:o},{id:m.hash,data:m.history.data}]:[{id:m.hash,data:m.history.data}],index:o?1:0}),M(!0);return}const fe=JSON.parse(J).findIndex(ge=>ge.id===(m==null?void 0:m.hash));if(fe!==-1){eo.log("Theme Prod Mode - Using localStorage theme data"),k({histories:JSON.parse(J),index:fe}),M(!0);return}C()},[k,M,C,v]);z.useEffect(()=>{var J;eo.logData("THEME_HISTORIES",O),O&&i&&zf((J=O.histories[O.index])==null?void 0:J.data,i)},[O,i]),z.useEffect(()=>{_&&(Y(),ee())},[n,_,r]),z.useEffect(()=>{b&&eo.logData("PUCK_INITIAL_HISTORY",b)},[b]);const re=()=>{eo.logFunc("clearHistory"),C(),p()};z.useEffect(()=>{var fe;if(!I)return;const J=(fe=O==null?void 0:O.histories[O.index])==null?void 0:fe.data;eo.logFunc("sendDevThemeSaveStateData useEffect"),a({payload:{devThemeSaveStateData:JSON.stringify(J)}})},[I,O,n]);const Z=!N||!I||!_,U=60+(N+I+_)*13.33;return Z?ne.jsx(hm,{progress:U}):ne.jsx(XZ,{puckConfig:t,puckInitialHistory:b,isLoading:Z,templateMetadata:n,publishThemeConfiguration:u,themeConfig:i,saveThemeSaveState:l,themeHistories:O,setThemeHistories:k,clearThemeHistory:re,sendDevThemeSaveStateData:a,buildThemeLocalStorageKey:v})},rJ=new zr,oJ=({document:e,componentRegistry:t,themeConfig:n})=>{e&&rJ.logData("DOCUMENT",e);const[r,o]=z.useState(void 0),[i,a]=z.useState(void 0),[l,u]=z.useState(!1),{templateMetadata:p,puckConfig:m,visualConfigurationData:_,visualConfigurationDataFetched:v,themeData:C,themeDataFetched:b}=wL(t),{pushPageSets:y}=Wu();CL(),z.useEffect(()=>{if(typeof window<"u"){const O=window.location.ancestorOrigins;O.length===0||!O[0].includes("pagescdn")&&!O[0].includes("yext.com")&&!O[0].includes("localhost")?window.location.assign("/404.html"):u(!0)}},[]),z.useEffect(()=>{if(p!=null&&p.isDevMode)try{o(pageSets),a(siteStream)}catch{console.warn("pageSets are not defined")}},[p==null?void 0:p.isDevMode]),z.useEffect(()=>{typeof window<"u"&&(p!=null&&p.isDevMode)&&r&&y({payload:{...r,siteStream:i}})},[p==null?void 0:p.isDevMode,r]);const N=!m||!p||!e||!v||!b,R=60*((!!m+!!p+!!e+v+b)/5);return ne.jsxs(ne.Fragment,{children:[N?l&&ne.jsx(hm,{progress:R}):p.isThemeMode?ne.jsx(nJ,{puckConfig:m,templateMetadata:p,visualConfigurationData:_,themeData:C,themeConfig:n}):ne.jsx(y2,{puckConfig:m,templateMetadata:p,visualConfigurationData:_,themeData:C,themeConfig:n}),ne.jsx(EL,{closeButton:!0,richColors:!0})]})},iJ=()=>{const[e,t]=z.useState();return ka("getEntityDocument",cr,(n,r)=>{t(r),n({status:"success",payload:{message:"getEntityDocument received"}})}),e},wg=JSON.stringify({root:{},content:[],zones:{}});function aJ(e,t){var p,m,_,v;if(!t)throw new Error("Unable to parse puck data, template name must be defined in config.");const{document:n}=e,r=n.visualConfigurations??[],o=n.pageLayouts??[],i=(p=n._site)==null?void 0:p.defaultLayouts;let a;for(const C of r)if(C.pageSet===t){a=JSON.parse(Dp(C.data,t));break}if(!a){for(const C of o)if(((m=C.visualConfiguration)==null?void 0:m.pageSet)===t){a=JSON.parse(Dp(C.visualConfiguration.data,t));break}}if(!a&&i){for(const C of i)if(((_=C.visualConfiguration)==null?void 0:_.pageSet)===t){a=JSON.parse(Dp(C.visualConfiguration.data,t));break}}a||(console.warn(`Unable to find puck data for pageSet: ${t}`),a=JSON.parse(wg));const l=e;l.document.visualTemplate=a;const u=(v=n._customDataOverrides)==null?void 0:v.pagesTheme;return u&&(l.document._site?l.document._site.pagesTheme=u:l.document._site={pagesTheme:u}),l}function Dp(e,t){if(!e||e.length<1)return console.warn(`Missing visual editor data for template: ${t}`),wg;try{JSON.parse(e)}catch{return console.warn(`Invalid visual editor data for template: ${t}`),wg}return e}const sJ=e=>{const t={};for(const n in e){const r=e[n].styles;for(const o in r){const i=r[o];if(t[i.plugin]||(t[i.plugin]={}),"default"in i)t[i.plugin][`${n}-${o}`]=`var(--${i.plugin}-${n}-${o})`;else if("styles"in i){const a={};for(const l in i.styles)a[l]=`var(--${i.plugin}-${n}-${o}-${l})`;t[i.plugin][`${n}-${o}`]=a}}}return t},BS=(e,t)=>{const n={...t};for(const r in e)if(r in e){const o=e[r],i=n[r];Lx(o)&&Lx(i)?n[r]=BS(o,i):(o&&i&&console.warn(`Both theme.config.ts and tailwind.config.ts provided a value for ${r}. Using the value from theme.config.ts (${i})`),n[r]=i??o)}return n},Lx=e=>e!==null&&typeof e=="object",lJ=(e,t)=>{const n=sJ(t);return BS(e,n)};exports.AddressComponent=eI;exports.Body=Tg;exports.BodyTextComponent=nI;exports.Button=Og;exports.CTA=Ug;exports.CTAWrapperComponent=iI;exports.DocumentContext=Yg;exports.DocumentProvider=wD;exports.Editor=oJ;exports.EmailsComponent=uI;exports.EntityField=_o;exports.EntityFieldsProvider=Qk;exports.FlexContainerComponent=hI;exports.GridSectionComponent=yI;exports.Heading=Vg;exports.HeadingTextComponent=_I;exports.HoursCardComponent=CI;exports.HoursStatusComponent=TI;exports.ImageWrapperComponent=$I;exports.Jl=Cu;exports.PhoneComponent=II;exports.Section=Fu;exports.TextListComponent=BI;exports.YextEntityFieldSelector=Ci;exports.Zl=Kx;exports.applyTheme=v2;exports.bodyVariants=Hx;exports.buttonVariants=zx;exports.headingVariants=OC;exports.lt=an;exports.resolveVisualEditorData=aJ;exports.resolveYextEntityField=xi;exports.sectionVariants=AC;exports.themeResolver=lJ;exports.useDocument=Uo;exports.useEntityFields=Nw;exports.usePlatformBridgeDocument=iJ;exports.usePlatformBridgeEntityFields=Xk;
|